public interface RandomAccessOutput extends DataOutput, Closeable
| 限定符和类型 | 方法和说明 |
|---|---|
long |
position()
Get the current write pointer position
|
void |
seek(long position)
Move write pointer to specified position
|
long |
skip(long n)
Skip
n bytes. |
void |
write(RandomAccessInput input,
long offset,
long length)
Read some bytes from the input in range [offset, offset + length],
then write the bytes to this output at current position
|
void |
writeFixedInt(int v)
At current position, write an int value that fixed in 4 bytes length
|
void |
writeFixedInt(long position,
int v)
Seek to specified position, and write an int value that fixed in 4
bytes length, then seek back to old postion
|
write, write, write, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUTFlong position()
void seek(long position) throws IOException
position - the new postionIOExceptionlong skip(long n) throws IOException
n bytes.IOExceptionvoid write(RandomAccessInput input, long offset, long length) throws IOException
input - the source inputoffset - the start offset to read from inputlength - the total length to read from inputIOExceptionvoid writeFixedInt(int v)
throws IOException
v - the int value writeIOExceptionvoid writeFixedInt(long position,
int v)
throws IOException
position - the new postion to writev - the int value writeIOExceptionCopyright © 2020–2021. All rights reserved.