org.xcmis.spi
Class BaseContentStream
java.lang.Object
org.xcmis.spi.BaseContentStream
- All Implemented Interfaces:
- ContentStream
- Direct Known Subclasses:
- RenditionContentStream
public class BaseContentStream
- extends Object
- implements ContentStream
- Version:
- $Id: BaseContentStream.java 316 2010-03-09 15:20:28Z andrew00x $
- Author:
- Andrey Parfonov
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BaseContentStream
public BaseContentStream(byte[] bytes,
String fileName,
MimeType mediaType)
- Parameters:
bytes - source bytes of contentfileName - name of content filemediaType - media type of content
BaseContentStream
public BaseContentStream(InputStream in,
long length,
String fileName,
MimeType mediaType)
- Parameters:
in - source streamfileName - name of content filelength - content length. Must be -1 if content length is unknown.mediaType - media type of content
BaseContentStream
public BaseContentStream(InputStream in,
String fileName,
MimeType mediaType)
- Parameters:
in - source streamfileName - name of content filemediaType - media type of content
getFileName
public String getFileName()
-
- Specified by:
getFileName in interface ContentStream
- Returns:
- content stream file name
getMediaType
public MimeType getMediaType()
-
- Specified by:
getMediaType in interface ContentStream
- Returns:
- content stream media type
getStream
public InputStream getStream()
throws IOException
-
- Specified by:
getStream in interface ContentStream
- Returns:
- byte stream
- Throws:
IOException - if i/o error occurs
length
public long length()
-
- Specified by:
length in interface ContentStream
- Returns:
- content stream length
Copyright © 2003-2013 eXo Platform SAS. All Rights Reserved.