public abstract class ByteBufferWriteOutBytes extends WriteOutBytes
| Modifier and Type | Method and Description | 
|---|---|
protected abstract ByteBuffer | 
allocateBuffer()  | 
InputStream | 
asInputStream()
Creates a finite  
InputStream with the bytes that are written to this WriteOutBytes so far. | 
boolean | 
isOpen()  | 
void | 
readFully(long pos,
         ByteBuffer buffer)
Reads bytes from the byte sequences, represented by this WriteOutBytes, at the random position, into the given
 buffer. 
 | 
long | 
size()
Returns the number of bytes written to this WriteOutBytes so far. 
 | 
void | 
write(byte[] b)  | 
void | 
write(byte[] b,
     int off,
     int len)  | 
int | 
write(ByteBuffer src)  | 
void | 
write(int b)  | 
void | 
writeInt(int v)
Writes 4 bytes of the given value in big-endian order, i. 
 | 
void | 
writeTo(ByteBuffer out)
Takes all bytes that are written to this WriteOutBytes so far and writes them into the given ByteBuffer. 
 | 
void | 
writeTo(WritableByteChannel channel)
Takes all bytes that are written to this WriteOutBytes so far and writes them into the given channel. 
 | 
closeflushpublic long size()
WriteOutBytessize in class WriteOutBytesprotected abstract ByteBuffer allocateBuffer()
public void write(int b)
write in class OutputStreampublic void writeInt(int v)
WriteOutBytesDataOutput.writeInt(int).writeInt in class WriteOutBytespublic void write(byte[] b)
           throws IOException
write in class OutputStreamIOExceptionpublic void write(byte[] b,
                  int off,
                  int len)
           throws IOException
write in class OutputStreamIOExceptionpublic int write(ByteBuffer src)
public void writeTo(WritableByteChannel channel) throws IOException
WriteOutByteswriteTo in class WriteOutBytesIOExceptionpublic void writeTo(ByteBuffer out)
size() of this WriteOutBytes.BufferOverflowException - if the Buffer.remaining() capacity of the given buffer is
 smaller than the size of this WriteOutBytespublic void readFully(long pos,
                      ByteBuffer buffer)
WriteOutBytesreadFully in class WriteOutBytespublic InputStream asInputStream() throws IOException
WriteOutBytesInputStream with the bytes that are written to this WriteOutBytes so far. The returned
 InputStream must be closed properly after it's used up.asInputStream in class WriteOutBytesIOExceptionpublic boolean isOpen()
Copyright © 2011–2018. All rights reserved.