|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.glassfish.grizzly.http.util.BufferChunk
public class BufferChunk
Buffer chunk representation.
Helps HTTP module to avoid redundant String creation.
| Constructor Summary | |
|---|---|
protected |
BufferChunk()
|
| Method Summary | |
|---|---|
int |
compare(int start,
int end,
String compareTo)
|
int |
compareIgnoreCase(int start,
int end,
String compareTo)
|
boolean |
equals(String s)
Compares the message bytes to the specified String object. |
boolean |
equalsIgnoreCase(String s)
Compares the message bytes to the specified String object. |
int |
findBytesAscii(byte[] b)
Returns the starting index of the specified byte sequence within this Buffer. |
Buffer |
getBuffer()
|
int |
getEnd()
|
int |
getStart()
|
boolean |
hasBuffer()
|
boolean |
hasString()
|
int |
indexOf(char c,
int fromIndex)
Returns true if the message bytes starts with the specified string. |
int |
indexOf(String s,
int fromIndex)
Returns true if the message bytes starts with the specified string. |
boolean |
isNull()
|
protected void |
lock()
|
static BufferChunk |
newInstance()
|
protected void |
onContentChanged()
|
void |
recycle()
|
protected void |
reset()
|
protected void |
resetBuffer()
|
protected void |
resetString()
|
protected void |
resetStringCache()
|
void |
set(BufferChunk value)
|
void |
setBuffer(Buffer buffer)
|
void |
setBuffer(Buffer buffer,
int start,
int end)
|
void |
setEnd(int end)
|
void |
setStart(int start)
|
void |
setString(String string)
|
int |
size()
Returns the BufferChunk length. |
boolean |
startsWith(String s,
int pos)
Returns true if the BufferChunk starts with
the specified string. |
boolean |
startsWithIgnoreCase(String s,
int pos)
Returns true if the BufferChunk starts with
the specified string. |
String |
toString()
|
String |
toString(Charset charset)
|
protected void |
unlock()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
protected BufferChunk()
| Method Detail |
|---|
public static BufferChunk newInstance()
public void set(BufferChunk value)
public Buffer getBuffer()
public void setBuffer(Buffer buffer)
public void setBuffer(Buffer buffer,
int start,
int end)
public int getStart()
public void setStart(int start)
public int getEnd()
public void setEnd(int end)
public void setString(String string)
public String toString()
toString in class Objectpublic String toString(Charset charset)
protected void onContentChanged()
public int size()
public int findBytesAscii(byte[] b)
Buffer.
b - byte sequence to search for.
Buffer
public int indexOf(char c,
int fromIndex)
c - the characterfromIndex - The start position
public int indexOf(String s,
int fromIndex)
s - the stringfromIndex - The start positionpublic boolean equals(String s)
s - the String to compare
public boolean equalsIgnoreCase(String s)
s - the String to compare
public int compareIgnoreCase(int start,
int end,
String compareTo)
public int compare(int start,
int end,
String compareTo)
public boolean startsWithIgnoreCase(String s,
int pos)
true if the BufferChunk starts with
the specified string.
s - the stringpos - The start position
true if the BufferChunk starts with
the specified string.
public boolean startsWith(String s,
int pos)
true if the BufferChunk starts with
the specified string.
s - the stringpos - The start position
true if the BufferChunk starts with
the specified string.public final boolean hasBuffer()
public final boolean hasString()
public final boolean isNull()
protected final void resetBuffer()
protected final void resetString()
protected final void resetStringCache()
protected void reset()
protected void lock()
protected void unlock()
public void recycle()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||