|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.exoplatform.commons.utils.Text
public abstract class Text
Represents text that can have several internal representations in order to minimize serialization when it is possible.
| Constructor Summary | |
|---|---|
Text()
|
|
| Method Summary | |
|---|---|
abstract void |
appendTo(Appendable appendable)
|
static Text |
create(byte[] bytes)
Create a text object from the provided byte array. |
static Text |
create(char[] chars)
Create a text object from the provided char array. |
static Text |
create(String s)
Create a text object from the provided char array. |
abstract byte[] |
getBytes()
|
abstract char[] |
getChars()
|
abstract void |
writeTo(Writer writer)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Text()
| Method Detail |
|---|
public static Text create(byte[] bytes)
throws IllegalArgumentException
bytes - the markup as bytes
IllegalArgumentException - if the bytes is null
public static Text create(char[] chars)
throws IllegalArgumentException
chars - the markup as bytes
IllegalArgumentException - if the chars is null
public static Text create(String s)
throws IllegalArgumentException
s - the markup as bytes
IllegalArgumentException - if the string is nullpublic abstract byte[] getBytes()
public abstract char[] getChars()
public abstract void appendTo(Appendable appendable)
throws IOException
IOException
public abstract void writeTo(Writer writer)
throws IOException
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||