public class MultipartRequestInputStream
extends java.io.BufferedInputStream
Modifier and Type | Field and Description |
---|---|
protected byte[] |
boundary |
protected FileUploadHeader |
lastHeader |
Constructor and Description |
---|
MultipartRequestInputStream(java.io.InputStream in) |
Modifier and Type | Method and Description |
---|---|
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.
|
protected byte[] boundary
protected FileUploadHeader lastHeader
public MultipartRequestInputStream(java.io.InputStream in)
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.IOException
public 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
Copyright © 2003-present Jodd Team