|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.io.InputStream
java.io.FilterInputStream
java.io.BufferedInputStream
jodd.servlet.upload.MultipartRequestInputStream
public class MultipartRequestInputStream
Extended input stream based on buffered requests input stream. It provides some more functions that might be useful when working with uploaded fies.
| Field Summary | |
|---|---|
protected byte[] |
boundary
|
protected FileUploadHeader |
lastHeader
|
| Fields inherited from class java.io.BufferedInputStream |
|---|
buf, count, marklimit, markpos, pos |
| Fields inherited from class java.io.FilterInputStream |
|---|
in |
| Constructor Summary | |
|---|---|
MultipartRequestInputStream(java.io.InputStream in)
|
|
| Method Summary | |
|---|---|
int |
copyAll(java.io.OutputStream out)
Copies bytes from this stream to some output until boundary is reached. |
int |
copyMax(java.io.OutputStream out,
int maxBytes)
Copies max or less number of bytes to output stream. |
FileUploadHeader |
getLastHeader()
|
boolean |
isBoundary(byte b)
Checks if the current byte (i.e. one that was read last) represents the very first byte of the boundary. |
byte[] |
readBoundary()
Reads boundary from the input stream. |
byte |
readByte()
Reads expected byte. |
FileUploadHeader |
readDataHeader(java.lang.String encoding)
Reads data header from the input stream. |
protected java.lang.String |
readDataHeaderString(java.lang.String encoding)
|
void |
skipBytes(int i)
Skips specified number of bytes. |
int |
skipToBoundary()
Skips to the boundary and returns total number of bytes skipped. |
| Methods inherited from class java.io.BufferedInputStream |
|---|
available, close, mark, markSupported, read, read, reset, skip |
| Methods inherited from class java.io.FilterInputStream |
|---|
read |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected byte[] boundary
protected FileUploadHeader lastHeader
| Constructor Detail |
|---|
public MultipartRequestInputStream(java.io.InputStream in)
| Method Detail |
|---|
public byte readByte()
throws java.io.IOException
java.io.IOException
public void skipBytes(int i)
throws java.io.IOException
java.io.IOException
public byte[] readBoundary()
throws java.io.IOException
java.io.IOExceptionpublic FileUploadHeader getLastHeader()
public FileUploadHeader readDataHeader(java.lang.String encoding)
throws java.io.IOException
null
java.io.IOException
protected java.lang.String readDataHeaderString(java.lang.String encoding)
throws java.io.IOException
java.io.IOException
public int copyAll(java.io.OutputStream out)
throws java.io.IOException
java.io.IOException
public int copyMax(java.io.OutputStream out,
int maxBytes)
throws java.io.IOException
java.io.IOException
public int skipToBoundary()
throws java.io.IOException
java.io.IOException
public boolean isBoundary(byte b)
throws java.io.IOException
java.io.IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||