|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.InputStream
com.infoengine.SAK.ContentInputStream
This class implements an input stream class for reading contents from MIME multipart streams.
Field Summary | |
private String |
boundary
|
private String |
contentType
|
private String |
disposition
|
private boolean |
eof
|
private String |
fileName
|
private Hashtable |
headers
|
private byte[] |
inputBuffer
|
private int |
inputBufferCursor
|
private int |
inputBufferLimit
|
private InputStream |
inputStream
|
private String |
name
|
Fields inherited from class java.io.InputStream |
|
Constructor Summary | |
ContentInputStream(InputStream inputStream,
String boundary,
boolean firstContent)
Constructor that initializes the instance to read from a multipart stream. |
Method Summary | |
int |
available()
Return the number of bytes that can be read without blocking. |
void |
close()
Close the input stream. |
String |
getContentType()
|
String |
getDisposition()
|
boolean |
getEof()
|
String |
getFileName()
|
String |
getHeader(String key)
|
Enumeration |
getHeaderKeys()
|
Hashtable |
getHeaders()
|
InputStream |
getInputStream()
|
String |
getName()
|
void |
mark(int readLimit)
Mark the current position in the input stream. |
boolean |
markSupported()
Return an indication of support for input stream marking. |
private void |
parseContentType(String heading)
|
private void |
parseDisposition(String heading)
|
int |
read()
Return a byte from the input stream. |
int |
read(byte[] b)
Read bytes from the input stream into an array. |
int |
read(byte[] buf,
int off,
int len)
Read bytes from the input stream into an array or subarray. |
String |
readLine()
Read a line of text from the client connection using the default character encoding for the platform. |
private int |
readLine(byte[] buf)
Read until a specified buffer is full, or a newline ('\n') is encountered. |
private int |
readLine(byte[] buf,
int start,
int end)
|
String |
readLine(String encoding)
Read a line of text from the client connection using a specified character encoding. |
void |
reset()
Reset input stream position to last mark. |
long |
skip(long n)
Read and discard bytes. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private String boundary
private String contentType
private String disposition
private boolean eof
private String fileName
private Hashtable headers
private InputStream inputStream
private String name
private byte[] inputBuffer
private int inputBufferCursor
private int inputBufferLimit
Constructor Detail |
public ContentInputStream(InputStream inputStream, String boundary, boolean firstContent) throws IOException
Method Detail |
private void parseDisposition(String heading) throws IOException
IOException
private void parseContentType(String heading) throws IOException
IOException
public int available() throws IOException
IOException
public void close() throws IOException
IOException
public void mark(int readLimit)
readLimit
- position to markpublic boolean markSupported()
public int read() throws IOException
IOException
public int read(byte[] b) throws IOException
b
- array
IOException
public int read(byte[] buf, int off, int len) throws IOException
buf
- arrayoff
- offset of array at which to read byteslen
- maximum number of bytes to read
IOException
public String readLine() throws IOException
IOException
public String readLine(String encoding) throws IOException
encoding
- the character encoding to apply to the connection
IOException
public void reset() throws IOException
IOException
public long skip(long n) throws IOException
n
- number of bytes to read and discard
IOException
public String getContentType()
public String getDisposition()
public String getName()
public String getFileName()
public Hashtable getHeaders()
public String getHeader(String key)
public Enumeration getHeaderKeys()
public InputStream getInputStream()
public boolean getEof()
private int readLine(byte[] buf) throws IOException
IOException
private int readLine(byte[] buf, int start, int end) throws IOException
IOException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |