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, writeString
public 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
DataOutput
copyFrom
in interface DataOutput
copyFrom
in class DataOutputStream
IOException
public final long written()
written
in interface DataOutput
written
in class DataOutputStream
public void writeByte(int val) throws IOException
writeByte
in interface DataOutput
writeByte
in class DataOutputStream
val
- Description of the ParameterIOException
- Description of the Exceptionpublic void write(byte[] buf, int offset, int len) throws IOException
write
in interface DataOutput
write
in class DataOutputStream
buf
- 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 DataOutputStream
IOException
public 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.