com.moesol.nio
Class UnsignedShortBuffer
java.lang.Object
com.moesol.nio.UnsignedShortBuffer
- All Implemented Interfaces:
- BufferMarker, Comparable
public class UnsignedShortBuffer
- extends Object
- implements BufferMarker, Comparable
Help getting bytes back as unsigned short (C size 4 bytes).
Same as CharBuffer, but System.out.println does the right thing.
UnsignedShortBuffer
public UnsignedShortBuffer(ByteBuffer b)
allocate
public static UnsignedShortBuffer allocate(int length)
- Parameters:
length
-
- Returns:
- new byte buffre
get
public int get()
get
public int get(int offset)
put
public void put(int v)
put
public void put(int offset,
int v)
get
public void get(int[] result)
- Parameters:
result
-
put
public void put(int[] values)
- Parameters:
values
-
hasRemaining
public boolean hasRemaining()
- Specified by:
hasRemaining
in interface BufferMarker
- Returns:
- true if remaining
remaining
public int remaining()
- Specified by:
remaining
in interface BufferMarker
- Returns:
- remaining
limit
public int limit()
- Specified by:
limit
in interface BufferMarker
- Returns:
- limit
capacity
public int capacity()
- Specified by:
capacity
in interface BufferMarker
- Returns:
- capacity
getByteBuffer
public ByteBuffer getByteBuffer()
- Specified by:
getByteBuffer
in interface BufferMarker
- Returns:
- underlying byte buffer
order
public UnsignedShortBuffer order(ByteOrder o)
flip
public BufferMarker flip()
- Specified by:
flip
in interface BufferMarker
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
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.