|
XNIO version 1.0.0.GA | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.xnio.Buffers
public final class Buffers
Buffer utility methods.
Method Summary | ||
---|---|---|
static
|
clear(T buffer)
Clear a buffer. |
|
static ByteBuffer |
fill(ByteBuffer buffer,
int value,
int count)
Fill a buffer with a repeated value. |
|
static CharBuffer |
fill(CharBuffer buffer,
int value,
int count)
Fill a buffer with a repeated value. |
|
static IntBuffer |
fill(IntBuffer buffer,
int value,
int count)
Fill a buffer with a repeated value. |
|
static LongBuffer |
fill(LongBuffer buffer,
long value,
int count)
Fill a buffer with a repeated value. |
|
static ShortBuffer |
fill(ShortBuffer buffer,
int value,
int count)
Fill a buffer with a repeated value. |
|
static
|
flip(T buffer)
Flip a buffer. |
|
static
|
limit(T buffer,
int limit)
Set the buffer limit. |
|
static
|
mark(T buffer)
Set the buffer mark. |
|
static
|
position(T buffer,
int position)
Set the buffer position. |
|
static
|
reset(T buffer)
Reset the buffer. |
|
static
|
rewind(T buffer)
Rewind the buffer. |
|
static
|
skip(T buffer,
int cnt)
Set a buffer's position relative to its current position. |
|
static ByteBuffer |
slice(ByteBuffer buffer,
int sliceSize)
Slice the buffer. |
|
static CharBuffer |
slice(CharBuffer buffer,
int sliceSize)
Slice the buffer. |
|
static IntBuffer |
slice(IntBuffer buffer,
int sliceSize)
Slice the buffer. |
|
static LongBuffer |
slice(LongBuffer buffer,
int sliceSize)
Slice the buffer. |
|
static ShortBuffer |
slice(ShortBuffer buffer,
int sliceSize)
Slice the buffer. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static <T extends Buffer> T flip(T buffer)
T
- the buffer typebuffer
- the buffer to flip
Buffer.flip()
public static <T extends Buffer> T clear(T buffer)
T
- the buffer typebuffer
- the buffer to clear
Buffer.clear()
public static <T extends Buffer> T limit(T buffer, int limit)
T
- the buffer typebuffer
- the buffer to setlimit
- the new limit
Buffer.limit(int)
public static <T extends Buffer> T mark(T buffer)
T
- the buffer typebuffer
- the buffer to mark
Buffer.mark()
public static <T extends Buffer> T position(T buffer, int position)
T
- the buffer typebuffer
- the buffer to setposition
- the new position
Buffer.position(int)
public static <T extends Buffer> T reset(T buffer)
T
- the buffer typebuffer
- the buffer to reset
Buffer.reset()
public static <T extends Buffer> T rewind(T buffer)
T
- the buffer typebuffer
- the buffer to rewind
Buffer.rewind()
public static ByteBuffer slice(ByteBuffer buffer, int sliceSize)
buffer
- the buffer to slicesliceSize
- the size of the slice
ByteBuffer.slice()
public static ByteBuffer fill(ByteBuffer buffer, int value, int count)
buffer
- the buffer to fillvalue
- the value to fillcount
- the number of bytes to fill
public static CharBuffer slice(CharBuffer buffer, int sliceSize)
buffer
- the buffer to slicesliceSize
- the size of the slice
CharBuffer.slice()
public static CharBuffer fill(CharBuffer buffer, int value, int count)
buffer
- the buffer to fillvalue
- the value to fillcount
- the number of chars to fill
public static ShortBuffer slice(ShortBuffer buffer, int sliceSize)
buffer
- the buffer to slicesliceSize
- the size of the slice
ShortBuffer.slice()
public static ShortBuffer fill(ShortBuffer buffer, int value, int count)
buffer
- the buffer to fillvalue
- the value to fillcount
- the number of shorts to fill
public static IntBuffer slice(IntBuffer buffer, int sliceSize)
buffer
- the buffer to slicesliceSize
- the size of the slice
IntBuffer.slice()
public static IntBuffer fill(IntBuffer buffer, int value, int count)
buffer
- the buffer to fillvalue
- the value to fillcount
- the number of ints to fill
public static LongBuffer slice(LongBuffer buffer, int sliceSize)
buffer
- the buffer to slicesliceSize
- the size of the slice
LongBuffer.slice()
public static LongBuffer fill(LongBuffer buffer, long value, int count)
buffer
- the buffer to fillvalue
- the value to fillcount
- the number of longs to fill
public static <T extends Buffer> T skip(T buffer, int cnt)
T
- the buffer typebuffer
- the buffer to setcnt
- the distantce to skip
Buffer.position(int)
|
XNIO version 1.0.0.GA | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |