|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjava.io.InputStream
org.apache.struts.upload.BufferedMultipartInputStream
This class implements buffering for an InputStream as well as a readLine method. The purpose of this is to provide a reliable readLine() method.
| Field Summary | |
protected byte[] |
buffer
Deprecated. The byte array used to hold buffered data |
protected int |
bufferLength
Deprecated. The number of bytes read from the underlying InputStream that are in the buffer |
protected int |
bufferOffset
Deprecated. The current offset we're at in the buffer's byte array |
protected int |
bufferSize
Deprecated. The size of the byte array buffer |
protected long |
contentLength
Deprecated. The content length of the multipart data |
protected boolean |
contentLengthMet
Deprecated. Whether or not bytes up to the Content-Length have been read |
protected java.io.InputStream |
inputStream
Deprecated. The underlying InputStream used by this class |
protected boolean |
maxLengthMet
Deprecated. Whether or not bytes up to the maximum length have been read |
protected long |
maxSize
Deprecated. The maximum allowed size for the multipart data, or -1 for an unlimited maximum file length |
protected int |
totalLength
Deprecated. The total number of bytes read so far |
| Fields inherited from class java.io.InputStream |
|
| Constructor Summary | |
BufferedMultipartInputStream(java.io.InputStream inputStream,
int bufferSize,
long contentLength,
long maxSize)
Deprecated. Public constructor for this class, just wraps the InputStream given |
|
| Method Summary | |
int |
available()
Deprecated. This method returns the number of available bytes left to read in the buffer before it has to be refilled |
void |
close()
Deprecated. This method attempts to close the underlying InputStream |
boolean |
contentLengthMet()
Deprecated. |
protected void |
fill()
Deprecated. Fills the buffer with data from the underlying inputStream. |
void |
mark(int position)
Deprecated. This method calls on the mark() method of the underlying InputStream |
boolean |
markSupported()
Deprecated. This method calls on the markSupported() method of the underlying InputStream |
boolean |
maxLengthMet()
Deprecated. |
int |
read()
Deprecated. This method returns the next byte in the buffer, and refills it if necessary. |
int |
read(byte[] b)
Deprecated. This method populates the byte array b with data up to
b.length bytes |
int |
read(byte[] b,
int offset,
int length)
Deprecated. This method populates the byte array b with data up to
length starting at b[offset] |
byte[] |
readLine()
Deprecated. This method reads a line, regardless of length. |
int |
readLine(byte[] b,
int offset,
int length)
Deprecated. This method reads into the byte array b until
a newline ('\n') character is encountered or the number of bytes
specified by length have been read |
void |
reset()
Deprecated. This method makes a call to the reset() method of the underlying InputStream |
| Methods inherited from class java.io.InputStream |
skip |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected java.io.InputStream inputStream
protected byte[] buffer
protected int bufferOffset
protected int bufferSize
protected int bufferLength
protected int totalLength
protected long contentLength
protected long maxSize
protected boolean contentLengthMet
protected boolean maxLengthMet
| Constructor Detail |
public BufferedMultipartInputStream(java.io.InputStream inputStream,
int bufferSize,
long contentLength,
long maxSize)
throws java.io.IOException
inputStream - The underlying stream to read frombufferSize - The size in bytes of the internal buffercontentLength - The content length for this requestmaxSize - The maximum size in bytes that this multipart
request can be, or -1 for an unlimited length| Method Detail |
public int available()
public void close()
throws java.io.IOException
java.io.IOExceptionpublic void mark(int position)
public boolean markSupported()
public boolean maxLengthMet()
public boolean contentLengthMet()
public int read()
throws java.io.IOException
java.io.IOException
public int read(byte[] b)
throws java.io.IOException
b with data up to
b.length bytes
java.io.IOException
public int read(byte[] b,
int offset,
int length)
throws java.io.IOException
b with data up to
length starting at b[offset]
java.io.IOException
public int readLine(byte[] b,
int offset,
int length)
throws java.io.IOException
b until
a newline ('\n') character is encountered or the number of bytes
specified by length have been read
java.io.IOException
public byte[] readLine()
throws java.io.IOException
java.io.IOException
public void reset()
throws java.io.IOException
java.io.IOException
protected void fill()
throws java.io.IOException
java.io.IOException
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||