OByteArrayOutputStream
instead.@Deprecated public class OMemoryStream extends OutputStream
Modifier and Type | Field and Description |
---|---|
static int |
DEF_SIZE
Deprecated.
|
Constructor and Description |
---|
OMemoryStream()
Deprecated.
|
OMemoryStream(byte[] stream)
Deprecated.
|
OMemoryStream(int initialCapacity)
Deprecated.
Callee takes ownership of 'buf'.
|
Modifier and Type | Method and Description |
---|---|
int |
available()
Deprecated.
Returns the available bytes to read.
|
void |
close()
Deprecated.
Equivalent to
reset() . |
byte[] |
copy()
Deprecated.
|
void |
copyFrom(OMemoryStream iSource,
int iSize)
Deprecated.
|
void |
fill(int iLength)
Deprecated.
Jumps bytes positioning forward of passed bytes.
|
void |
fill(int iLength,
byte iFiller)
Deprecated.
Fills the stream from current position writing iLength times the iFiller byte
|
boolean |
getAsBoolean()
Deprecated.
|
byte |
getAsByte()
Deprecated.
|
byte[] |
getAsByteArray()
Deprecated.
|
byte[] |
getAsByteArray(int iOffset)
Deprecated.
|
byte[] |
getAsByteArrayFixed(int iSize)
Deprecated.
|
int |
getAsByteArrayOffset()
Deprecated.
Browse the stream but just return the begin of the byte array.
|
char |
getAsChar()
Deprecated.
|
int |
getAsInteger()
Deprecated.
|
long |
getAsLong()
Deprecated.
|
short |
getAsShort()
Deprecated.
|
String |
getAsString()
Deprecated.
|
byte[] |
getInternalBuffer()
Deprecated.
|
int |
getPosition()
Deprecated.
|
int |
getSize()
Deprecated.
|
int |
getVariableSize()
Deprecated.
|
OMemoryStream |
jump(int iOffset)
Deprecated.
|
void |
move(int iFrom,
int iPosition)
Deprecated.
Move bytes left or right of an offset.
|
byte |
peek()
Deprecated.
|
int |
read()
Deprecated.
|
int |
read(byte[] b)
Deprecated.
|
int |
read(byte[] b,
int off,
int len)
Deprecated.
|
void |
remove(int iBegin,
int iEnd)
Deprecated.
|
void |
reset()
Deprecated.
Does not reduce the current capacity.
|
int |
set(boolean iContent)
Deprecated.
|
void |
set(byte iContent)
Deprecated.
|
int |
set(byte[] iContent)
Deprecated.
Append byte[] to the stream.
|
int |
set(char iContent)
Deprecated.
|
int |
set(int iContent)
Deprecated.
|
int |
set(long iContent)
Deprecated.
|
int |
set(short iContent)
Deprecated.
|
void |
setAsFixed(byte[] iContent)
Deprecated.
|
int |
setCustom(String iContent)
Deprecated.
|
OMemoryStream |
setPosition(int iPosition)
Deprecated.
|
void |
setSource(byte[] iBuffer)
Deprecated.
|
int |
setUtf8(String iContent)
Deprecated.
|
int |
size()
Deprecated.
|
byte[] |
toByteArray()
Deprecated.
Returns the used buffer as byte[].
|
void |
write(byte[] iBuffer,
int iOffset,
int iLength)
Deprecated.
|
void |
write(int b)
Deprecated.
|
void |
writeTo(OutputStream out)
Deprecated.
|
flush, write
public static final int DEF_SIZE
public OMemoryStream()
public OMemoryStream(int initialCapacity)
public OMemoryStream(byte[] stream)
public void move(int iFrom, int iPosition)
iFrom
- Starting positioniPosition
- Offset to the iFrom value: positive values mean move right, otherwise move
leftpublic void copyFrom(OMemoryStream iSource, int iSize)
public final void writeTo(OutputStream out) throws IOException
IOException
public final byte[] getInternalBuffer()
public final byte[] toByteArray()
public final void reset()
public final void write(int b)
write
in class OutputStream
public final void write(byte[] iBuffer, int iOffset, int iLength)
write
in class OutputStream
public final void close()
reset()
.close
in interface Closeable
close
in interface AutoCloseable
close
in class OutputStream
public final void setAsFixed(byte[] iContent)
public int set(byte[] iContent)
iContent
- IOException
public void remove(int iBegin, int iEnd)
public void set(byte iContent)
public final int setCustom(String iContent)
public final int setUtf8(String iContent)
public int set(boolean iContent)
public int set(char iContent)
public int set(int iContent)
public int set(long iContent)
public int set(short iContent)
public int getPosition()
public OMemoryStream setPosition(int iPosition)
public void fill(int iLength)
iLength
- Bytes to jumppublic void fill(int iLength, byte iFiller)
iLength
- Bytes to jumpiFiller
- Byte to use to fill the spacepublic OMemoryStream jump(int iOffset)
public byte[] getAsByteArrayFixed(int iSize)
public int getAsByteArrayOffset()
public int read()
public int read(byte[] b)
public int read(byte[] b, int off, int len)
public byte[] getAsByteArray(int iOffset)
public byte[] getAsByteArray()
public int available()
public String getAsString()
public boolean getAsBoolean()
public char getAsChar()
public byte getAsByte()
public long getAsLong()
public int getAsInteger()
public short getAsShort()
public byte peek()
public void setSource(byte[] iBuffer)
public byte[] copy()
public int getVariableSize()
public int getSize()
public final int size()
Copyright © 2009–2020 OrientDB. All rights reserved.