org.xiruss.repository.api
Interface TextStorageObject

All Superinterfaces:
RepositoryObject, StorageObject, Version
All Known Subinterfaces:
XmlStorageObject
All Known Implementing Classes:
TextStorageObjectBase, TextStorageObjectProxy, XmlStorageObjectBase, XmlStorageObjectProxy

public interface TextStorageObject
extends StorageObject

Represents storage objects that are interpreted as sequences of characters in some character encoding, as opposed to binary objects, such as bitmapped graphics. Importers should set the property: XirussRepositoryConst.ObjPropNames.CHARACTER_ENCODING When characters are written to the storage object.


Method Summary
 java.lang.String getEncoding()
          Returns the character encoding used to represent the text characters as bytes, e.g., "utf-8", "utf-16", "ISO-8859-1", "GB-2312", etc.
 java.io.Reader openReader()
          Opens a character reader for reading the characters of the storage object.
 java.io.Writer openWriter()
          If the version is not fixed (mutable), opens a character writer for writing characters to the storage object.
 
Methods inherited from interface org.xiruss.repository.api.StorageObject
canWrite, close, getBytes, getMimeType, getOriginalSystemId, length, openInputStream, openOutputStream, setStorageObjectData
 
Methods inherited from interface org.xiruss.snapcm.api.Version
addDependency, addNextVersion, addPreviousVersion, checkIsNotFixed, collectTargetVersions, dependsOn, dependsOn, getDependencies, getDependenciesByType, getNext, getPrevious, getResource, initialize, initialize, isFixed, setAsFixed, setPrevious
 
Methods inherited from interface org.xiruss.snapcm.api.RepositoryObject
accept, compareTo, getId, getName, getProperties, getProperty, getPropertyNames, getRepository, getType, hasProperty, initialize, isNull, setId, setName, setProperty, toString
 

Method Detail

getEncoding

java.lang.String getEncoding()
Returns the character encoding used to represent the text characters as bytes, e.g., "utf-8", "utf-16", "ISO-8859-1", "GB-2312", etc.

Returns:

openReader

java.io.Reader openReader()
                          throws java.io.IOException
Opens a character reader for reading the characters of the storage object.

Returns:
A new reader.
Throws:
java.io.IOException

openWriter

java.io.Writer openWriter()
                          throws java.io.IOException,
                                 VersionMutationException
If the version is not fixed (mutable), opens a character writer for writing characters to the storage object.

Returns:
New writer.
Throws:
java.io.IOException
VersionMutationException - If the version is fixed (immutable).