Package | Description |
---|---|
java.nio |
Defines buffers, which are containers for data.
|
java.nio.channels |
Defines channels, which represent connections to entities that are capable of
performing I/O operations, such as files.
|
Modifier and Type | Method and Description |
---|---|
static ByteBuffer |
ByteBuffer.allocateDirect(int capacity)
Allocates a new direct byte buffer.
|
ByteBuffer |
ByteBuffer.get(byte[] dst)
Relative bulk get method.
|
ByteBuffer |
ByteBuffer.get(byte[] dst,
int offset,
int length)
Relative bulk get method.
|
ByteBuffer |
ByteBuffer.order(ByteOrder bo)
Modifies this buffer's byte order.
|
ByteBuffer |
ByteBuffer.put(byte b)
Relative put method (optional operation).
|
ByteBuffer |
ByteBuffer.put(byte[] src)
Relative bulk put method (optional operation).
|
ByteBuffer |
ByteBuffer.put(byte[] src,
int offset,
int length)
Relative bulk put method (optional operation).
|
ByteBuffer |
ByteBuffer.put(ByteBuffer src)
Relative bulk put method (optional operation).
|
ByteBuffer |
ByteBuffer.put(int index,
byte b)
Absolute put method (optional operation).
|
ByteBuffer |
ByteBuffer.putFloat(float value)
Relative put method for writing a float
value (optional operation).
|
ByteBuffer |
ByteBuffer.putFloat(int index,
float value)
Absolute put method for writing a float
value (optional operation).
|
ByteBuffer |
ByteBuffer.putInt(int value)
Relative put method for writing an int
value (optional operation).
|
ByteBuffer |
ByteBuffer.putInt(int index,
int value)
Absolute put method for writing an int
value (optional operation).
|
ByteBuffer |
ByteBuffer.putShort(int index,
short value)
Absolute put method for writing a short
value (optional operation).
|
ByteBuffer |
ByteBuffer.putShort(short value)
Relative put method for writing a short
value (optional operation).
|
ByteBuffer |
ByteBuffer.slice()
Creates a new byte buffer whose content is a shared subsequence of
this buffer's content.
|
static ByteBuffer |
ByteBuffer.wrap(byte[] array)
Wraps a byte array into a buffer.
|
static ByteBuffer |
ByteBuffer.wrap(byte[] array,
int offset,
int length)
Wraps a byte array into a buffer.
|
Modifier and Type | Method and Description |
---|---|
int |
ByteBuffer.compareTo(ByteBuffer that)
Compares this buffer to another.
|
ByteBuffer |
ByteBuffer.put(ByteBuffer src)
Relative bulk put method (optional operation).
|
Modifier and Type | Method and Description |
---|---|
int |
SeekableByteChannel.read(ByteBuffer dst)
Reads a sequence of bytes from this channel into the given buffer.
|
int |
ReadableByteChannel.read(ByteBuffer dst)
Reads a sequence of bytes from this channel into the given buffer.
|
abstract int |
FileChannel.read(ByteBuffer dst)
Reads a sequence of bytes from this channel into the given buffer.
|
abstract int |
FileChannel.read(ByteBuffer dst,
long position)
Reads a sequence of bytes from this channel into the given buffer,
starting at the given file position.
|
int |
WritableByteChannel.write(ByteBuffer src)
Writes a sequence of bytes to this channel from the given buffer.
|
int |
SeekableByteChannel.write(ByteBuffer src)
Writes a sequence of bytes to this channel from the given buffer.
|
abstract int |
FileChannel.write(ByteBuffer src)
Writes a sequence of bytes to this channel from the given buffer.
|
abstract int |
FileChannel.write(ByteBuffer src,
long position)
Writes a sequence of bytes to this channel from the given buffer,
starting at the given file position.
|
Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. Use of this specification is subject to license terms.