public interface ByteHolder
Modifier and Type | Method and Description |
---|---|
int |
available()
Return the number of bytes that can be read from this ByteHolder
without blocking on an IO.
|
void |
clear()
Clear the bytes from the ByteHolder and place it in writing
mode.
|
ByteHolder |
cloneEmpty()
Return a byte holder matching existing type and size of current
ByteHolder, but don't bother to fill the bytes.
|
int |
numBytesSaved()
Return the number of bytes that have been saved to this byte holder.
|
int |
read()
Read a byte from this ByteHolder.
|
int |
read(byte[] b,
int off,
int len)
Read up to 'len' bytes from this ByteHolder and store them in
an array at offset 'off'.
|
int |
read(java.io.OutputStream out,
int len)
Read from the ByteHolder.
|
int |
shiftToFront()
shift the remaining unread bytes to the beginning of the byte holder
|
long |
skip(long count)
Skip over the specified number of bytes in a ByteHolder.
|
void |
startReading()
Place a ByteHolder in reading mode.
|
void |
write(byte[] data,
int offset,
int len)
Write len bytes of data starting at 'offset' to this ByteHolder.
|
long |
write(java.io.InputStream in,
long count)
Write up to count bytes from an input stream to this
ByteHolder.
|
void |
write(int b)
Write a byte to this ByteHolder.
|
boolean |
writingMode()
Return true if this is in writing mode.
|
void write(int b) throws java.io.IOException
The ByteHolder must be in writing mode to call this.
java.io.IOException
void write(byte[] data, int offset, int len) throws java.io.IOException
The ByteHolder must be in writing mode to call this.
java.io.IOException
long write(java.io.InputStream in, long count) throws java.io.IOException
java.io.IOException
- thrown when reading in causes an
error.void clear() throws java.io.IOException
java.io.IOException
void startReading() throws java.io.IOException
java.io.IOException
int read() throws java.io.IOException
The ByteHolder must be in reading mode to call this.
java.io.IOException
int read(byte[] b, int off, int len) throws java.io.IOException
The ByteHolder must be in reading mode to call this.
java.io.IOException
int read(java.io.OutputStream out, int len) throws java.io.IOException
Read up to 'len' bytes from this ByteHolder and write them to the OutputStream
The ByteHolder must be in reading mode to call this.
java.io.IOException
int shiftToFront() throws java.io.IOException
java.io.IOException
int available() throws java.io.IOException
java.io.IOException
int numBytesSaved() throws java.io.IOException
java.io.IOException
long skip(long count) throws java.io.IOException
java.io.IOException
boolean writingMode()
ByteHolder cloneEmpty()
ByteHolder
.Apache Derby V10.13 Internals - Copyright © 2004,2016 The Apache Software Foundation. All Rights Reserved.