42 |
/** |
/** |
43 |
* @since 1.4 |
* @since 1.4 |
44 |
*/ |
*/ |
45 |
public abstract class ByteBuffer extends Buffer |
public abstract class ByteBuffer extends Buffer implements Comparable |
46 |
{ |
{ |
47 |
private ByteOrder endian = ByteOrder.BIG_ENDIAN; |
private ByteOrder endian = ByteOrder.BIG_ENDIAN; |
48 |
|
|
99 |
* @exception IndexOutOfBoundsException - If the preconditions on the offset |
* @exception IndexOutOfBoundsException - If the preconditions on the offset |
100 |
* and length parameters do not hold. |
* and length parameters do not hold. |
101 |
*/ |
*/ |
102 |
final public ByteBuffer get (byte[] dst, int offset, int length) |
public ByteBuffer get (byte[] dst, int offset, int length) |
103 |
{ |
{ |
104 |
if ((offset < 0) || |
if ((offset < 0) || |
105 |
(offset > dst.length) || |
(offset > dst.length) || |
124 |
* @exception BufferUnderflowException If there are fewer than dst.length |
* @exception BufferUnderflowException If there are fewer than dst.length |
125 |
* bytes remaining in this buffer. |
* bytes remaining in this buffer. |
126 |
*/ |
*/ |
127 |
final public ByteBuffer get (byte[] dst) |
public ByteBuffer get (byte[] dst) |
128 |
{ |
{ |
129 |
return get (dst, 0, dst.length); |
return get (dst, 0, dst.length); |
130 |
} |
} |
139 |
* @exception IllegalArgumentException If the source buffer is this buffer. |
* @exception IllegalArgumentException If the source buffer is this buffer. |
140 |
* @exception ReadOnlyBufferException If this buffer is read only. |
* @exception ReadOnlyBufferException If this buffer is read only. |
141 |
*/ |
*/ |
142 |
final public ByteBuffer put (ByteBuffer src) |
public ByteBuffer put (ByteBuffer src) |
143 |
{ |
{ |
144 |
if (src == this) |
if (src == this) |
145 |
throw new IllegalArgumentException (); |
throw new IllegalArgumentException (); |
167 |
* and length parameters do not hold. |
* and length parameters do not hold. |
168 |
* @exception ReadOnlyBufferException If this buffer is read only. |
* @exception ReadOnlyBufferException If this buffer is read only. |
169 |
*/ |
*/ |
170 |
final public ByteBuffer put (byte[] src, int offset, int length) |
public ByteBuffer put (byte[] src, int offset, int length) |
171 |
{ |
{ |
172 |
if ((offset < 0) || |
if ((offset < 0) || |
173 |
(offset > src.length) || |
(offset > src.length) || |