|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.jso.text.Text
Class that represents a text (long string) to be used by storable objects.
In storable objects strings are limited on length when stored, because of performance issues. Text objects, in contrast, do not have these limitations but demand extra effort for storage.
Whenever short length strings can be used String
class should
be used. If a string may contain a large amount of data, Text
class should be used instead.
Constructor Summary | |
Text()
Initializes a newly created Text object so that it represents an empty character sequence. |
|
Text(byte[] bytes)
Constructs a new Text by decoding the specified array of bytes using the platform's default charset. |
|
Text(byte[] bytes,
int offset,
int length)
Constructs a new Text by decoding the specified subarray of bytes using the platform's default charset. |
|
Text(byte[] bytes,
int offset,
int length,
java.lang.String charsetName)
Constructs a new Text by decoding the specified subarray of bytes using the specified charset. |
|
Text(byte[] bytes,
java.lang.String charsetName)
Constructs a new Text by decoding the specified array of bytes using the specified charset. |
|
Text(char[] value)
Allocates a new Text so that it represents the sequence of characters currently contained in the character array argument. |
|
Text(char[] value,
int offset,
int count)
Allocates a new String that contains characters from a subarray of the character array argument. |
|
Text(java.lang.String original)
Initializes a newly created Text object so that it represents the same sequence of characters as the argument; in other words, the newly created Text is a copy of the argument string. |
|
Text(java.lang.StringBuffer buffer)
Allocates a new Text that contains the sequence of characters currently contained in the string buffer argument. |
|
Text(Text original)
Initializes a newly created Text object so that it represents the same sequence of characters as the argument; in other words, the newly created Text is a copy of the argument Text. |
Method Summary | |
char |
charAt(int index)
Returns the character at the specified index. |
int |
compareTo(java.lang.Object o)
Compares this text to another object. |
int |
compareToIgnoreCase(Text t)
Compares this text to another object, ignoring case considerations. |
boolean |
equals(java.lang.Object o)
Compares this text to the specified object. |
boolean |
equalsIgnoreCase(Text t)
Compares this text to the specified object, ignoring case considerations. |
int |
hashCode()
Returns a hash code for this string. |
int |
length()
Returns the length of this text. |
java.lang.CharSequence |
subSequence(int start,
int end)
Returns a new character sequence that is a subsequence of this text. |
java.lang.String |
toString()
Returns a string containing the characters in this text. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Text()
public Text(byte[] bytes)
public Text(byte[] bytes, int offset, int length)
public Text(byte[] bytes, int offset, int length, java.lang.String charsetName) throws java.io.UnsupportedEncodingException
public Text(byte[] bytes, java.lang.String charsetName) throws java.io.UnsupportedEncodingException
public Text(char[] value)
public Text(char[] value, int offset, int count)
public Text(java.lang.String original)
public Text(java.lang.StringBuffer buffer)
public Text(Text original)
Method Detail |
public int compareTo(java.lang.Object o)
compareTo
in interface java.lang.Comparable
public int compareToIgnoreCase(Text t)
public char charAt(int index)
charAt
in interface java.lang.CharSequence
public int length()
length
in interface java.lang.CharSequence
public java.lang.CharSequence subSequence(int start, int end)
subSequence
in interface java.lang.CharSequence
public java.lang.String toString()
toString
in interface java.lang.CharSequence
public boolean equals(java.lang.Object o)
public boolean equalsIgnoreCase(Text t)
public int hashCode()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |