public class CompressedStringRepresentation extends ByteArrayRepresentation
ByteArrayRepresentation
that can be constructed using text
and an encoding, which it then compresses into bytes according the encoding.
This is an alternative to using an Encoder
filter, allowing you
direct control over and access to the final representation.
UNKNOWN_SIZE
Constructor and Description |
---|
CompressedStringRepresentation(CharSequence text,
Encoding encoding)
Construction with media type "text/plain" and UTF-8.
|
CompressedStringRepresentation(CharSequence text,
Language language,
Encoding encoding)
Construction with media type "text/plain" and UTF-8.
|
CompressedStringRepresentation(CharSequence text,
MediaType mediaType,
Encoding encoding)
Construction with UTF-8.
|
CompressedStringRepresentation(CharSequence text,
MediaType mediaType,
Language language,
CharacterSet characterSet,
Encoding encoding) |
CompressedStringRepresentation(CharSequence text,
MediaType mediaType,
Language language,
Encoding encoding)
Construction with UTF-8.
|
getStream, getText, release, setStream, write
getChannel, getReader, write, write
append, exhaust, getAvailableSize, getDigest, getDisposition, getExpirationDate, getRange, getRegistration, getSize, hasKnownSize, isAvailable, isEmpty, isSelectable, isTransient, setAvailable, setDigest, setDisposition, setExpirationDate, setListener, setRange, setSize, setTransient
getModificationDate, getTag, setModificationDate, setTag
createClientInfo, equals, getCharacterSet, getEncodings, getLanguages, getLocationRef, getMediaType, includes, isCompatible, setCharacterSet, setEncodings, setLanguages, setLocationRef, setLocationRef, setMediaType, toString
public CompressedStringRepresentation(CharSequence text, Encoding encoding) throws IOException
text
- The textencoding
- The encodingIOException
- In case of a compression errorpublic CompressedStringRepresentation(CharSequence text, Language language, Encoding encoding) throws IOException
text
- The textlanguage
- The languageencoding
- The encodingIOException
- In case of a compression errorpublic CompressedStringRepresentation(CharSequence text, MediaType mediaType, Encoding encoding) throws IOException
text
- The textmediaType
- The media typeencoding
- The encodingIOException
- In case of a compression errorpublic CompressedStringRepresentation(CharSequence text, MediaType mediaType, Language language, Encoding encoding) throws IOException
text
- The textmediaType
- The media typelanguage
- The languageencoding
- The encodingIOException
- In case of a compression errorpublic CompressedStringRepresentation(CharSequence text, MediaType mediaType, Language language, CharacterSet characterSet, Encoding encoding) throws IOException
text
- The textmediaType
- The media typelanguage
- The languagecharacterSet
- The character setencoding
- The encodingIOException
- In case of a compression errorCopyright © 2009-2016 Three Crickets LLC.