com.atlassian.confluence.pages.persistence.dao
Class AttachmentDataStream.InputStreamWrapper

java.lang.Object
  extended by com.atlassian.confluence.pages.persistence.dao.AttachmentDataStream.InputStreamWrapper
All Implemented Interfaces:
AttachmentDataStream
Enclosing interface:
AttachmentDataStream

public static class AttachmentDataStream.InputStreamWrapper
extends Object
implements AttachmentDataStream

An AttachmentDataStream implementation that wraps a raw InputStream. Note that this implementation doesn't behave exactly as the interface sayas it should, in that it wraps an already opened stream. As such, multiple calls to getInputStream() are not permitted.


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.atlassian.confluence.pages.persistence.dao.AttachmentDataStream
AttachmentDataStream.FileWrapper, AttachmentDataStream.InputStreamWrapper
 
Constructor Summary
AttachmentDataStream.InputStreamWrapper(AttachmentDataStreamType dataStreamType, InputStream inputStream)
           
 
Method Summary
 InputStream getInputStream()
          Obtains an InputStream for this stream.
 AttachmentDataStreamType getType()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AttachmentDataStream.InputStreamWrapper

public AttachmentDataStream.InputStreamWrapper(AttachmentDataStreamType dataStreamType,
                                               InputStream inputStream)
Method Detail

getType

public AttachmentDataStreamType getType()
Specified by:
getType in interface AttachmentDataStream
Returns:
The AttachmentDataStreamType associated with this stream.

getInputStream

public InputStream getInputStream()
                           throws IOException
Description copied from interface: AttachmentDataStream
Obtains an InputStream for this stream. It is expected that each call creates a fresh stream.

Specified by:
getInputStream in interface AttachmentDataStream
Throws:
IOException


Copyright © 2003–2015 Atlassian. All rights reserved.