Method Summary |
|
public ReadableByteChannel | getChannel() Returns a channel with the representation's content. If it is
supported by a file, a read-only instance of FileChannel is returned.
This method is ensured to return a fresh channel for each invocation
unless it is a transient representation, in which case null is returned. |
public CharacterSet | getCharacterSet() Returns the character set or null if not applicable. |
public List<Encoding> | getEncodings() Returns the list of encodings. |
public Date | getExpirationDate() Returns the future date when this representation expire. |
public Reference | getIdentifier() Returns the official identifier. |
public List<Language> | getLanguages() Returns the list of languages. |
public MediaType | getMediaType() Returns the media type. |
public Date | getModificationDate() Returns the last date when this representation was modified. |
public long | getSize() Returns the size in bytes if known, UNKNOWN_SIZE (-1) otherwise. |
public InputStream | getStream() Returns a stream with the representation's content. |
public Tag | getTag() Returns the tag. |
public String | getText() Converts the representation to a string value. |
public Representation | getWrappedRepresentation() Returns the wrapped representation. |
public boolean | isAvailable() Indicates if some fresh content is available, without having to actually
call one of the content manipulation method like getStream() that would
actually consume it. |
public boolean | isTransient() Indicates if the representation's content is transient, which means that
it can be obtained only once. |
public void | setAvailable(boolean isAvailable) Indicates if some fresh content is available. |
public void | setCharacterSet(CharacterSet characterSet) Sets the character set or null if not applicable. |
public void | setExpirationDate(Date expirationDate) Sets the future date when this representation expire. |
public void | setIdentifier(Reference identifier) Sets the official identifier. |
public void | setIdentifier(String identifierUri) Sets the official identifier from a URI string. |
public void | setMediaType(MediaType mediaType) Sets the media type. |
public void | setModificationDate(Date modificationDate) Sets the last date when this representation was modified. |
public void | setSize(long expectedSize) Sets the expected size in bytes if known, -1 otherwise. |
public void | setTag(Tag tag) Sets the tag. |
public void | setTransient(boolean isTransient) Indicates if the representation's content is transient. |
public void | write(OutputStream outputStream) Writes the representation to a byte stream. |
public void | write(WritableByteChannel writableChannel) Writes the representation to a byte channel. |