org.nuxeo.core.resources.model.impl
Class StreamContentSource

java.lang.Object
  extended by org.nuxeo.core.resources.model.impl.StreamContentSource
All Implemented Interfaces:
IContentSource

public class StreamContentSource
extends java.lang.Object
implements IContentSource

Author:
Bogdan Stefanescu

Constructor Summary
StreamContentSource(byte[] bytes)
           
StreamContentSource(java.io.InputStream in)
           
StreamContentSource(java.lang.String content)
           
 
Method Summary
 void close()
          Close the input stream returned previously by IContentSource.open() If no input stream was opened does nothing
 java.io.InputStream open()
          Open an input stream to read the content
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StreamContentSource

public StreamContentSource(java.io.InputStream in)

StreamContentSource

public StreamContentSource(byte[] bytes)

StreamContentSource

public StreamContentSource(java.lang.String content)
Method Detail

open

public java.io.InputStream open()
                         throws java.io.IOException
Description copied from interface: IContentSource
Open an input stream to read the content

Specified by:
open in interface IContentSource
Returns:
the content input stream
Throws:
java.io.IOException - if an error occurs

close

public void close()
Description copied from interface: IContentSource
Close the input stream returned previously by IContentSource.open() If no input stream was opened does nothing

Specified by:
close in interface IContentSource