public interface ExtendedDataOutput extends DataOutput
Modifier and Type | Method and Description |
---|---|
void |
ensureWritable(int minSize)
Ensure that backing byte structure has at least minSize
additional bytes
|
byte[] |
getByteArray()
Get the internal byte array (if possible), read-only
|
int |
getPos()
Get the position in the output stream
|
void |
reset()
Clears the buffer
|
void |
skipBytes(int bytesToSkip)
Skip some number of bytes.
|
byte[] |
toByteArray()
Copies the internal byte array
|
byte[] |
toByteArray(int offset,
int length)
Return a copy of slice of byte array
|
void |
writeInt(int pos,
int value)
In order to write a size as a first part of an data output, it is
useful to be able to write an int at an arbitrary location in the stream
|
write, write, write, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUTF
void ensureWritable(int minSize)
minSize
- additional size requiredvoid skipBytes(int bytesToSkip)
bytesToSkip
- Number of bytes to skipvoid writeInt(int pos, int value)
pos
- Byte position in the output streamvalue
- Value to writeint getPos()
byte[] getByteArray()
byte[] toByteArray()
byte[] toByteArray(int offset, int length)
offset
- offset of arraylength
- length of slicevoid reset()
Copyright © 2011-2020 The Apache Software Foundation. All Rights Reserved.