public class MemoryOutputStream extends DataOutputStream
| Constructor and Description |
|---|
MemoryOutputStream(int size,
int delta)
Constructor for the MemoryOutputStream object
|
| Modifier and Type | Method and Description |
|---|---|
void |
copyFrom(DataInput in,
int length)
Copies bytes of a given length from input stream.
|
void |
flush() |
byte[] |
getAllBytes() |
byte[] |
getWrittenBytes() |
MemoryInputStream |
open() |
void |
reset()
Description of the Method
|
void |
write(byte[] buf,
int offset,
int len)
Description of the Method
|
void |
writeByte(int val)
Description of the Method
|
static void |
writeInt(byte[] wr_buff,
int i,
int val)
Writes the integer value as little-endian in the array from the offset.
|
static void |
writeLong(byte[] wr_buff,
int i,
long val)
Writes the long-int value as little-endian in the array from the offset.
|
void |
writeTo(DataOutput dos)
Description of the Method
|
long |
written()
Description of the Method
|
close, copyFrom, printUTFS, writeBoolean, writeFully, writeInt, writeLong, writePack7, writePack7I, writeShort, writeStringpublic MemoryOutputStream(int size,
int delta)
size - Description of the Parameterdelta - Description of the Parameterpublic MemoryInputStream open()
public void copyFrom(DataInput in, int length) throws IOException
DataOutputcopyFrom in interface DataOutputcopyFrom in class DataOutputStreamIOExceptionpublic final long written()
written in interface DataOutputwritten in class DataOutputStreampublic void writeByte(int val)
throws IOException
writeByte in interface DataOutputwriteByte in class DataOutputStreamval - Description of the ParameterIOException - Description of the Exceptionpublic void write(byte[] buf,
int offset,
int len)
throws IOException
write in interface DataOutputwrite in class DataOutputStreambuf - Description of the Parameteroffset - Description of the Parameterlen - Description of the ParameterIOException - Description of the Exceptionpublic void writeTo(DataOutput dos) throws IOException
dos - Description of the ParameterIOException - Description of the Exceptionpublic void reset()
public byte[] getAllBytes()
public byte[] getWrittenBytes()
public void flush()
throws IOException
flush in class DataOutputStreamIOExceptionpublic static void writeLong(byte[] wr_buff,
int i,
long val)
public static void writeInt(byte[] wr_buff,
int i,
int val)
Copyright © 2016 Egothor. All Rights Reserved.