org.xiruss.repository.server.storagemanagement.specializations
Class TextStorageObjectBase

java.lang.Object
  extended by org.xiruss.repository.server.RepositoryObjectBase
      extended by org.xiruss.repository.server.VersionBase
          extended by org.xiruss.repository.server.CompoundDocumentBase
              extended by org.xiruss.repository.server.StorageObjectBase
                  extended by org.xiruss.repository.server.storagemanagement.specializations.TextStorageObjectBase
All Implemented Interfaces:
java.lang.Comparable, CompoundDocument, StorageObject, TextStorageObject, RepositoryObject, Version
Direct Known Subclasses:
XmlStorageObjectBase

public class TextStorageObjectBase
extends StorageObjectBase
implements TextStorageObject

Represents storage objects that are interpreted as sequences of characters in some character encoding, as opposed to binary objects, such as bitmapped graphics.


Field Summary
(package private) static org.apache.log4j.Logger logger
           
 
Fields inherited from class org.xiruss.repository.server.StorageObjectBase
length
 
Fields inherited from class org.xiruss.repository.server.CompoundDocumentBase
membersCache
 
Fields inherited from class org.xiruss.repository.server.RepositoryObjectBase
id, name, objectTypeConstant, properties, rep
 
Constructor Summary
TextStorageObjectBase()
           
 
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 class org.xiruss.repository.server.StorageObjectBase
canWrite, close, closeWriter, getBytes, getMimeType, getOriginalSystemId, getWriterForImpl, length, openInputStream, openOutputStream, setStorageObjectData
 
Methods inherited from class org.xiruss.repository.server.CompoundDocumentBase
accept, getMemberVersions
 
Methods inherited from class org.xiruss.repository.server.VersionBase
addDependency, addNextVersion, addPreviousVersion, checkIsNotFixed, collectTargetVersions, compareTo, dependsOn, dependsOn, getDependencies, getDependenciesByType, getNext, getPrevious, getResource, initialize, initialize, isFixed, setAsFixed, setPrevious, setResource
 
Methods inherited from class org.xiruss.repository.server.RepositoryObjectBase
getId, getName, getProperties, getProperty, getPropertyNames, getRepository, getType, hasProperty, initialize, initialize, isNull, setId, setName, setProperties, setProperty, setRepository, setType, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
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
 

Field Detail

logger

static org.apache.log4j.Logger logger
Constructor Detail

TextStorageObjectBase

public TextStorageObjectBase()
Method Detail

getEncoding

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

Specified by:
getEncoding in interface TextStorageObject
Returns:

openReader

public java.io.Reader openReader()
                          throws java.io.IOException
Description copied from interface: TextStorageObject
Opens a character reader for reading the characters of the storage object.

Specified by:
openReader in interface TextStorageObject
Returns:
A new reader.
Throws:
java.io.IOException

openWriter

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

Specified by:
openWriter in interface TextStorageObject
Returns:
New writer.
Throws:
java.io.IOException
VersionMutationException - If the version is fixed (immutable).