public final class ByteBufferStream extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
ByteBuffer |
buffer |
| 构造器和说明 |
|---|
ByteBufferStream() |
ByteBufferStream(ByteBuffer buffer) |
ByteBufferStream(int capacity) |
| 限定符和类型 | 方法和说明 |
|---|---|
static ByteBuffer |
allocate(int capacity) |
int |
available() |
void |
close() |
void |
flip() |
static void |
free(ByteBuffer buffer) |
InputStream |
getInputStream() |
OutputStream |
getOutputStream() |
void |
mark(int readlimit) |
boolean |
markSupported() |
int |
read() |
int |
read(byte[] b) |
int |
read(byte[] b,
int off,
int len) |
int |
read(ByteBuffer b) |
void |
readFrom(ByteChannel channel,
int length) |
void |
readFrom(InputStream istream) |
void |
reset() |
void |
rewind() |
long |
skip(long n) |
byte[] |
toArray() |
static ByteBufferStream |
wrap(byte[] array) |
static ByteBufferStream |
wrap(byte[] array,
int offset,
int length) |
void |
write(byte[] b) |
void |
write(byte[] b,
int off,
int len) |
void |
write(ByteBuffer b) |
void |
write(int b) |
void |
writeTo(ByteChannel channel) |
void |
writeTo(OutputStream ostream) |
public ByteBuffer buffer
public ByteBufferStream()
public ByteBufferStream(int capacity)
public ByteBufferStream(ByteBuffer buffer)
public static final ByteBuffer allocate(int capacity)
public static final void free(ByteBuffer buffer)
public static final ByteBufferStream wrap(byte[] array, int offset, int length)
public static final ByteBufferStream wrap(byte[] array)
public final void close()
public final InputStream getInputStream()
public final OutputStream getOutputStream()
public final int read()
public final int read(byte[] b)
public final int read(byte[] b,
int off,
int len)
public final int read(ByteBuffer b)
public final long skip(long n)
public final int available()
public final boolean markSupported()
public final void mark(int readlimit)
public final void reset()
public final void write(int b)
public final void write(byte[] b)
public final void write(byte[] b,
int off,
int len)
public final void write(ByteBuffer b)
public final void flip()
public final void rewind()
public final byte[] toArray()
public final void readFrom(InputStream istream) throws IOException
IOExceptionpublic final void writeTo(OutputStream ostream) throws IOException
IOExceptionpublic final void readFrom(ByteChannel channel, int length) throws IOException
IOExceptionpublic final void writeTo(ByteChannel channel) throws IOException
IOExceptionCopyright © 2018. All rights reserved.