public class ByteBuffer extends Buffer
Constructor and Description |
---|
ByteBuffer()
Creates an instance of a Buffer.
|
ByteBuffer(byte[] bytes,
int offset,
boolean forRead)
Creates an instance of a Buffer.
|
Modifier and Type | Method and Description |
---|---|
byte[] |
getBytes()
Gets the buffer.
|
InputStream |
getInputStream()
Gets an InputStream to read buffer information.
|
OutputStream |
getOutputStream()
Gets an OutputStream to write buffer information.
|
long |
getSize()
Gets the buffer size.
|
void |
setBytes(byte[] bytes)
Sets the buffer.
|
getOffset, isReadBuffer, setOffset, setReadFlag, toString
public ByteBuffer(byte[] bytes, int offset, boolean forRead)
public ByteBuffer()
public byte[] getBytes()
public void setBytes(byte[] bytes)
bytes
- The new buffer.public long getSize()
public InputStream getInputStream() throws IOException
getInputStream
in class Buffer
IOException
public OutputStream getOutputStream() throws IOException
getOutputStream
in class Buffer
IOException
Copyright © 2003, 2023, Oracle and/or its affiliates.