com.moesol.nio
Class UnsignedByteBuffer
java.lang.Object
com.moesol.nio.UnsignedByteBuffer
- All Implemented Interfaces:
- BufferMarker, Comparable
public class UnsignedByteBuffer
- extends Object
- implements BufferMarker, Comparable
Help getting bytes back as unsigned.
UnsignedByteBuffer
public UnsignedByteBuffer(ByteBuffer b)
allocate
public static UnsignedByteBuffer allocate(int capacity)
get
public short get()
get
public short get(int offset)
get
public void get(short[] result)
put
public void put(short v)
put
public void put(int offset,
short v)
put
public void put(short[] values)
remaining
public int remaining()
- Specified by:
remaining
in interface BufferMarker
- Returns:
- shorts remaining
limit
public int limit()
- Specified by:
limit
in interface BufferMarker
- Returns:
- number of shorts in this buffer
capacity
public int capacity()
- Specified by:
capacity
in interface BufferMarker
- Returns:
- number of shorts this buffer could store
order
public void order(ByteOrder bo)
- Parameters:
bo
-
flip
public BufferMarker flip()
- Specified by:
flip
in interface BufferMarker
getByteBuffer
public ByteBuffer getByteBuffer()
- Specified by:
getByteBuffer
in interface BufferMarker
- Returns:
- underlying byte buffer
compareTo
public int compareTo(Object o)
- Specified by:
compareTo
in interface Comparable
position
public int position()
- Specified by:
position
in interface BufferMarker
position
public BufferMarker position(int newPosition)
- Specified by:
position
in interface BufferMarker
limit
public BufferMarker limit(int newLimit)
- Specified by:
limit
in interface BufferMarker
mark
public BufferMarker mark()
- Specified by:
mark
in interface BufferMarker
reset
public BufferMarker reset()
- Specified by:
reset
in interface BufferMarker
clear
public BufferMarker clear()
- Specified by:
clear
in interface BufferMarker
rewind
public BufferMarker rewind()
- Specified by:
rewind
in interface BufferMarker
hasRemaining
public boolean hasRemaining()
- Specified by:
hasRemaining
in interface BufferMarker
isReadOnly
public boolean isReadOnly()
- Specified by:
isReadOnly
in interface BufferMarker
equals
public boolean equals(Object arg0)
- Overrides:
equals
in class Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
Copyright © 2004 Moebius Solutions, Inc. All Rights Reserved.