public class Buffer extends Object implements Comparable<Buffer>
Constructor and Description |
---|
Buffer(Buffer other) |
Buffer(byte[] data) |
Buffer(byte[] data,
int offset,
int length) |
Buffer(ByteBuffer other) |
Buffer(int size) |
Modifier and Type | Method and Description |
---|---|
AsciiBuffer |
ascii() |
static AsciiBuffer |
ascii(Buffer buffer) |
static AsciiBuffer |
ascii(String value) |
BufferEditor |
bigEndianEditor() |
Buffer |
buffer() |
Buffer |
clear() |
Buffer |
compact() |
int |
compareTo(Buffer o) |
boolean |
contains(byte value) |
boolean |
containsAt(Buffer needle,
int pos) |
Buffer |
data(byte[] data) |
Buffer |
deepCopy() |
boolean |
equals(Buffer obj) |
boolean |
equals(Object obj) |
Buffer |
flip() |
byte |
get(int i) |
byte[] |
getData() |
int |
getLength() |
int |
getOffset() |
int |
hashCode() |
String |
hex() |
BufferInputStream |
in() |
int |
indexOf(Buffer needle) |
int |
indexOf(Buffer needle,
int pos) |
int |
indexOf(byte value) |
int |
indexOf(byte value,
int pos) |
boolean |
isEmpty() |
static Buffer |
join(List<Buffer> items,
Buffer seperator) |
int |
length() |
Buffer |
length(int length) |
BufferEditor |
littleEndianEditor() |
Buffer |
moveHead(int value) |
Buffer |
moveTail(int value) |
Buffer |
offset(int offset) |
BufferOutputStream |
out() |
void |
readFrom(DataInput in)
same as in.readFully(data, offset, length);
|
int |
readFrom(InputStream in)
same as in.read(data, offset, length);
|
void |
reset() |
Buffer |
slice(int low,
int high) |
Buffer[] |
split(byte separator) |
boolean |
startsWith(Buffer other) |
static String |
string(Buffer value) |
byte[] |
toByteArray() |
ByteBuffer |
toByteBuffer() |
String |
toString() |
Buffer |
trim() |
Buffer |
trimEnd() |
Buffer |
trimFront() |
UTF8Buffer |
utf8() |
static UTF8Buffer |
utf8(Buffer buffer) |
static UTF8Buffer |
utf8(String value) |
void |
writeTo(DataOutput out)
same as out.write(data, offset, length);
|
void |
writeTo(OutputStream out)
same as out.write(data, offset, length);
|
public Buffer(ByteBuffer other)
public Buffer(Buffer other)
public Buffer(int size)
public Buffer(byte[] data)
public Buffer(byte[] data, int offset, int length)
public String hex()
public final Buffer flip()
public final Buffer moveHead(int value)
public final Buffer moveTail(int value)
public final Buffer clear()
public final Buffer slice(int low, int high)
public final byte[] getData()
public final Buffer data(byte[] data)
public final int getLength()
public final int length()
public final Buffer length(int length)
public final int getOffset()
public final Buffer offset(int offset)
public final Buffer deepCopy()
public final Buffer compact()
public final byte[] toByteArray()
public final byte get(int i)
public final boolean equals(Buffer obj)
public final BufferInputStream in()
public final BufferOutputStream out()
public final BufferEditor bigEndianEditor()
public final BufferEditor littleEndianEditor()
public final boolean isEmpty()
public final boolean contains(byte value)
public final int indexOf(byte value)
public final int indexOf(byte value, int pos)
public final boolean startsWith(Buffer other)
public final int indexOf(Buffer needle)
public final int indexOf(Buffer needle, int pos)
public final boolean containsAt(Buffer needle, int pos)
public final Buffer trim()
public final Buffer trimEnd()
public final Buffer trimFront()
public final Buffer buffer()
public final AsciiBuffer ascii()
public final UTF8Buffer utf8()
public final Buffer[] split(byte separator)
public void reset()
public int compareTo(Buffer o)
compareTo
in interface Comparable<Buffer>
public void writeTo(DataOutput out) throws IOException
IOException
public void writeTo(OutputStream out) throws IOException
IOException
public void readFrom(DataInput in) throws IOException
IOException
public int readFrom(InputStream in) throws IOException
IOException
public ByteBuffer toByteBuffer()
public static AsciiBuffer ascii(String value)
public static AsciiBuffer ascii(Buffer buffer)
public static UTF8Buffer utf8(String value)
public static UTF8Buffer utf8(Buffer buffer)
Copyright © 2010–2021 FuseSource, Corp.. All rights reserved.