|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.restlet.gwt.resource.Variant
org.restlet.gwt.resource.Representation
org.restlet.gwt.resource.StringRepresentation
public class StringRepresentation
Represents an Unicode string that can be converted to any character set supported by Java.
Field Summary |
---|
Fields inherited from class org.restlet.gwt.resource.Representation |
---|
UNKNOWN_SIZE |
Constructor Summary | |
---|---|
StringRepresentation(java.lang.String text)
Constructor. |
|
StringRepresentation(java.lang.String text,
Language language)
Constructor. |
|
StringRepresentation(java.lang.String text,
MediaType mediaType)
Constructor. |
|
StringRepresentation(java.lang.String text,
MediaType mediaType,
Language language)
Constructor. |
|
StringRepresentation(java.lang.String text,
MediaType mediaType,
Language language,
CharacterSet characterSet)
Constructor. |
Method Summary | |
---|---|
java.lang.String |
getText()
Converts the representation to a string value. |
void |
release()
Closes and releases the input stream. |
void |
setCharacterSet(CharacterSet characterSet)
Sets the character set or null if not applicable. |
void |
setText(java.lang.String text)
Sets the string value. |
protected void |
updateSize()
Updates the expected size according to the current string value. |
Methods inherited from class org.restlet.gwt.resource.Representation |
---|
createEmpty, getDownloadName, getExpirationDate, getModificationDate, getSize, getTag, isAvailable, isDownloadable, isTransient, setAvailable, setDownloadable, setDownloadName, setExpirationDate, setModificationDate, setSize, setTag, setTransient |
Methods inherited from class org.restlet.gwt.resource.Variant |
---|
getCharacterSet, getEncodings, getIdentifier, getLanguages, getMediaType, setEncodings, setIdentifier, setIdentifier, setLanguages, setMediaType |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StringRepresentation(java.lang.String text)
text
- The string value.public StringRepresentation(java.lang.String text, Language language)
text
- The string value.language
- The language.public StringRepresentation(java.lang.String text, MediaType mediaType)
text
- The string value.mediaType
- The media type.public StringRepresentation(java.lang.String text, MediaType mediaType, Language language)
text
- The string value.mediaType
- The media type.language
- The language.public StringRepresentation(java.lang.String text, MediaType mediaType, Language language, CharacterSet characterSet)
text
- The string value.mediaType
- The media type.language
- The language.characterSet
- The character set.Method Detail |
---|
public java.lang.String getText()
Representation
getText
in class Representation
public void release()
release
in class Representation
public void setCharacterSet(CharacterSet characterSet)
Variant
setCharacterSet
in class Variant
characterSet
- The character set or null if not applicable.public void setText(java.lang.String text)
text
- The string value.protected void updateSize()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |