org.benow.web.path.page.stream
Class ResultStream
java.lang.Object
java.io.InputStream
org.benow.web.path.page.stream.ResultStream
- All Implemented Interfaces:
- java.io.Closeable
public class ResultStream
- extends java.io.InputStream
A InputStream that delivers the given data with a given mime and possible
suggested file name. If this type of InputStream is returned from a service
call, the data will be delivered directly with the appropriate type, etc.
- Author:
- andy
|
Constructor Summary |
ResultStream(java.io.InputStream toDeliver)
|
ResultStream(java.io.InputStream toDeliver,
org.benow.java.mime.MimeType mimeType)
|
ResultStream(java.io.InputStream toDeliver,
org.benow.java.mime.MimeType mimeType,
java.lang.String suggestedName)
|
| Methods inherited from class java.io.InputStream |
available, mark, markSupported, reset, skip |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ResultStream
public ResultStream(java.io.InputStream toDeliver)
ResultStream
public ResultStream(java.io.InputStream toDeliver,
org.benow.java.mime.MimeType mimeType)
ResultStream
public ResultStream(java.io.InputStream toDeliver,
org.benow.java.mime.MimeType mimeType,
java.lang.String suggestedName)
getMimeType
public org.benow.java.mime.MimeType getMimeType()
getSuggestedFileName
public java.lang.String getSuggestedFileName()
close
public void close()
throws java.io.IOException
- Specified by:
close in interface java.io.Closeable- Overrides:
close in class java.io.InputStream
- Throws:
java.io.IOException
read
public int read()
throws java.io.IOException
- Specified by:
read in class java.io.InputStream
- Throws:
java.io.IOException
read
public int read(byte[] b)
throws java.io.IOException
- Overrides:
read in class java.io.InputStream
- Throws:
java.io.IOException
read
public int read(byte[] b,
int off,
int len)
throws java.io.IOException
- Overrides:
read in class java.io.InputStream
- Throws:
java.io.IOException