org.apache.chemistry.opencmis.inmemory.storedobj.impl
Class ContentStreamDataImpl

java.lang.Object
  extended by org.apache.chemistry.opencmis.inmemory.storedobj.impl.ContentStreamDataImpl
All Implemented Interfaces:
ContentStream, ExtensionsData

public class ContentStreamDataImpl
extends java.lang.Object
implements ContentStream


Constructor Summary
ContentStreamDataImpl(long maxAllowedContentSizeKB)
           
 
Method Summary
 java.math.BigInteger getBigLength()
          Returns the length of stream.
 byte[] getBytes()
           
 ContentStream getCloneWithLimits(long offset, long length)
           
 java.util.List<CmisExtensionElement> getExtensions()
           
 java.lang.String getFilename()
           
 java.lang.String getFileName()
          Returns the file name of the stream.
 long getLength()
          Returns the length of stream.
 java.lang.String getMimeType()
          Returns the MIME type of the stream.
 java.io.InputStream getStream()
          Returns the stream.
 void setContent(java.io.InputStream in)
           
 void setExtensions(java.util.List<CmisExtensionElement> extensions)
           
 void setFileName(java.lang.String fileName)
           
 void setMimeType(java.lang.String fMimeType)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContentStreamDataImpl

public ContentStreamDataImpl(long maxAllowedContentSizeKB)
Method Detail

setContent

public void setContent(java.io.InputStream in)
                throws java.io.IOException
Throws:
java.io.IOException

getLength

public long getLength()
Description copied from interface: ContentStream
Returns the length of stream.

Specified by:
getLength in interface ContentStream
Returns:
the length of the stream in bytes or -1 if the length is unknown

getBigLength

public java.math.BigInteger getBigLength()
Description copied from interface: ContentStream
Returns the length of stream.

Specified by:
getBigLength in interface ContentStream
Returns:
the length of the stream in bytes or null if the length is unknown

getMimeType

public java.lang.String getMimeType()
Description copied from interface: ContentStream
Returns the MIME type of the stream.

Specified by:
getMimeType in interface ContentStream
Returns:
the MIME type of the stream or null if the MIME type is unknown

setMimeType

public void setMimeType(java.lang.String fMimeType)

getFileName

public java.lang.String getFileName()
Description copied from interface: ContentStream
Returns the file name of the stream.

Specified by:
getFileName in interface ContentStream
Returns:
the file name of the stream or null if the file name is unknown

setFileName

public void setFileName(java.lang.String fileName)

getFilename

public java.lang.String getFilename()

getStream

public java.io.InputStream getStream()
Description copied from interface: ContentStream
Returns the stream. It is important to close this stream properly!

Specified by:
getStream in interface ContentStream

getCloneWithLimits

public ContentStream getCloneWithLimits(long offset,
                                        long length)

getBytes

public final byte[] getBytes()

getExtensions

public java.util.List<CmisExtensionElement> getExtensions()
Specified by:
getExtensions in interface ExtensionsData

setExtensions

public void setExtensions(java.util.List<CmisExtensionElement> extensions)
Specified by:
setExtensions in interface ExtensionsData


Copyright © 2009-2011 The Apache Software Foundation. All Rights Reserved.