2002-11-13 Michael Koch <konqueror@gmx.de>
* java/nio/ByteBuffer.java (allocate): New method. (wrap): New method. (put): New method. (get): New method. From-SVN: r59082
This commit is contained in:
parent
4a1338ed66
commit
61d318260a
2 changed files with 45 additions and 0 deletions
|
@ -1,3 +1,11 @@
|
|||
2002-11-13 Michael Koch <konqueror@gmx.de>
|
||||
|
||||
* java/nio/ByteBuffer.java
|
||||
(allocate): New method.
|
||||
(wrap): New method.
|
||||
(put): New method.
|
||||
(get): New method.
|
||||
|
||||
2002-11-13 Michael Koch <konqueror@gmx.de>
|
||||
|
||||
* java/nio/channels/AlreadyConnectedException.java:
|
||||
|
|
|
@ -39,4 +39,41 @@ package java.nio;
|
|||
|
||||
public abstract class ByteBuffer extends Buffer
|
||||
{
|
||||
public static ByteBuffer allocate (int capacity)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
final public static ByteBuffer wrap (byte[] array, int offset, int length)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
final public static ByteBuffer wrap (byte[] array)
|
||||
{
|
||||
return wrap (array, 0, array.length);
|
||||
}
|
||||
|
||||
final public ByteBuffer put (ByteBuffer src)
|
||||
{
|
||||
while (src.hasRemaining ())
|
||||
put (src.get ());
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
final public ByteBuffer put (byte[] src, int offset, int length)
|
||||
{
|
||||
for (int i = offset; i < offset + length; i++)
|
||||
put (src [i]);
|
||||
return this;
|
||||
}
|
||||
public final ByteBuffer put (byte[] src)
|
||||
{
|
||||
return put (src, 0, src.length);
|
||||
}
|
||||
|
||||
public abstract byte get ();
|
||||
|
||||
public abstract ByteBuffer put (byte b);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue