| Modifier and Type | Class and Description |
|---|---|
| public static class |
| Modifier and Type | Field and Description |
|---|---|
| private final ByteChunk | |
| private boolean | |
| private final CharChunk | |
| private static MessageBytes. | |
| private boolean | |
| private int | |
| private boolean | |
| private boolean | |
| private boolean | |
| private int | |
| private long | |
| private String | |
| public static final int | T_BYTES
getType() is T_STR if the the object used to create the MessageBytes was a byte[] |
| public static final int | T_CHARS
getType() is T_STR if the the object used to create the MessageBytes was a char[] |
| public static final int | |
| public static final int | T_STR
getType() is T_STR if the the object used to create the MessageBytes was a String |
| private int |
| Access | Constructor and Description |
|---|---|
| public | MessageBytes()
Deprecated
Use static newInstance() in order to allow future hooks.
Creates a new, uninitialized MessageBytes object. |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public boolean | |
| public boolean | equals(Object obj)
Overrides java. Indicates whether some other object is "equal to" this one. |
| public boolean | Returns: true if the comparison succeeded, false otherwisethe String to compare s)Compares the message bytes to the specified String object. |
| public ByteChunk | |
| public CharChunk | |
| public MessageBytes | |
| public int | |
| public int | |
| public long | |
| public String | |
| public int | |
| private int | |
| public int | |
| private int | |
| public int | |
| public int | |
| public int | |
| public int | indexOf(char
the character c, int The start position starting)Returns true if the message bytes starts with the specified string. |
| public int | |
| public boolean | |
| public static MessageBytes | |
| public void | |
| public void | |
| public void | setBytes(byte[]
the bytes b, int the start offset of the bytes off, int the length of the bytes len)Sets the content to the specified subarray of bytes. |
| public void | |
| public void | setChars(char[]
the bytes c, int the start offset of the bytes off, int the length of the bytes len)Sets the content to be a char[] |
| public void | |
| public static void | |
| public void | |
| public void | |
| public void | |
| public boolean | |
| public boolean | startsWithIgnoreCase(String
the string s, int The start position pos)Returns true if the message bytes starts with the specified string. |
| public void | |
| public void | |
| public String |
| byteC | back to summary |
|---|---|
| private final ByteChunk byteC | |
| caseSensitive | back to summary |
|---|---|
| private boolean caseSensitive | |
| charC | back to summary |
|---|---|
| private final CharChunk charC | |
| factory | back to summary |
|---|---|
| private static MessageBytes. | |
| hasHashCode | back to summary |
|---|---|
| private boolean hasHashCode | |
| hashCode | back to summary |
|---|---|
| private int hashCode | |
| hasIntValue | back to summary |
|---|---|
| private boolean hasIntValue | |
| hasLongValue | back to summary |
|---|---|
| private boolean hasLongValue | |
| hasStrValue | back to summary |
|---|---|
| private boolean hasStrValue | |
| intValue | back to summary |
|---|---|
| private int intValue | |
| longValue | back to summary |
|---|---|
| private long longValue | |
| strValue | back to summary |
|---|---|
| private String strValue | |
| T_BYTES | back to summary |
|---|---|
| public static final int T_BYTES getType() is T_STR if the the object used to create the MessageBytes was a byte[] | |
| T_CHARS | back to summary |
|---|---|
| public static final int T_CHARS getType() is T_STR if the the object used to create the MessageBytes was a char[] | |
| T_NULL | back to summary |
|---|---|
| public static final int T_NULL | |
| T_STR | back to summary |
|---|---|
| public static final int T_STR getType() is T_STR if the the object used to create the MessageBytes was a String | |
| type | back to summary |
|---|---|
| private int type | |
| MessageBytes | back to summary |
|---|---|
| public MessageBytes()
Deprecated Use static newInstance() in order to allow future hooks. Creates a new, uninitialized MessageBytes object.
| |
| duplicate | back to summary |
|---|---|
| public void duplicate(MessageBytes src) throws IOException Copy the src into this MessageBytes, allocating more space if needed | |
| equals | back to summary |
|---|---|
| public boolean equals(String s) Compares the message bytes to the specified String object.
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object obj) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.
| |
| equalsIgnoreCase | back to summary |
|---|---|
| public boolean equalsIgnoreCase(String s) Compares the message bytes to the specified String object.
| |
| getByteChunk | back to summary |
|---|---|
| public ByteChunk getByteChunk() Returns the byte chunk, representing the byte[] and offset/length. Valid only if T_BYTES or after a conversion was made. | |
| getCharChunk | back to summary |
|---|---|
| public CharChunk getCharChunk() Returns the char chunk, representing the char[] and offset/length. Valid only if T_CHARS or after a conversion was made. | |
| getClone | back to summary |
|---|---|
| public MessageBytes getClone() | |
| getInt | back to summary |
|---|---|
| public int getInt() Convert the buffer to an int, cache the value | |
| getLength | back to summary |
|---|---|
| public int getLength() Returns the length of the original buffer. Note that the length in bytes may be different from the length in chars. | |
| getLong | back to summary |
|---|---|
| public long getLong() Convert the buffer to an long, cache the value | |
| getString | back to summary |
|---|---|
| public String getString() Returns the string value. Valid only if T_STR or after a conversion was made. | |
| getType | back to summary |
|---|---|
| public int getType() Return the type of the original content. Can be T_STR, T_BYTES, T_CHARS or T_NULL | |
| hash | back to summary |
|---|---|
| private int hash() | |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| hashIgnoreCase | back to summary |
|---|---|
| private int hashIgnoreCase() | |
| indexOf | back to summary |
|---|---|
| public int indexOf(char c) | |
| indexOf | back to summary |
|---|---|
| public int indexOf(String s, int starting) | |
| indexOf | back to summary |
|---|---|
| public int indexOf(String s) | |
| indexOf | back to summary |
|---|---|
| public int indexOf(char c, int starting) Returns true if the message bytes starts with the specified string.
| |
| indexOfIgnoreCase | back to summary |
|---|---|
| public int indexOfIgnoreCase(String s, int starting) | |
| isNull | back to summary |
|---|---|
| public boolean isNull() | |
| newInstance | back to summary |
|---|---|
| public static MessageBytes newInstance() Construct a new MessageBytes instance | |
| recycle | back to summary |
|---|---|
| public void recycle() Resets the message bytes to an uninitialized (NULL) state. | |
| resetStringValue | back to summary |
|---|---|
| public void resetStringValue() Remove the cached string value. Use it after a conversion on the byte[] or after the encoding is changed XXX Is this needed ? | |
| setBytes | back to summary |
|---|---|
| public void setBytes(byte[] b, int off, int len) Sets the content to the specified subarray of bytes.
| |
| setCaseSenitive | back to summary |
|---|---|
| public void setCaseSenitive(boolean b) Configure the case sensitivity | |
| setChars | back to summary |
|---|---|
| public void setChars(char[] c, int off, int len) Sets the content to be a char[]
| |
| setCharset | back to summary |
|---|---|
| public void setCharset(Charset enc) Set the encoding. If the object was constructed from bytes[]. any previous conversion is reset. If no encoding is set, we'll use 8859-1. | |
| setFactory | back to summary |
|---|---|
| public static void setFactory(MessageBytes. | |
| setInt | back to summary |
|---|---|
| public void setInt(int i) Set the buffer to the representation of an int | |
| setLong | back to summary |
|---|---|
| public void setLong(long l) Set the buffer to the representation of an long | |
| setString | back to summary |
|---|---|
| public void setString(String s) Set the content to be a string | |
| startsWith | back to summary |
|---|---|
| public boolean startsWith(String s) Returns true if the message bytes starts with the specified string.
| |
| startsWithIgnoreCase | back to summary |
|---|---|
| public boolean startsWithIgnoreCase(String s, int pos) Returns true if the message bytes starts with the specified string.
| |
| toBytes | back to summary |
|---|---|
| public void toBytes() Unimplemented yet. Do a char->byte conversion. | |
| toChars | back to summary |
|---|---|
| public void toChars() Convert to char[] and fill the CharChunk. XXX Not optimized - it converts to String first. | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Compute the string value
| |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public MessageBytes |
| MessageBytesFactory | back to summary |
|---|---|
| protected MessageBytesFactory() | |
| newInstance | back to summary |
|---|---|
public MessageBytes newInstance()
| |