|
||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||
java.lang.Objectjava.io.InputStream
org.apache.struts.upload.MultipartBoundaryInputStream
This class encapsulates parsing functionality for RFC1867, multipart/form-data. See MultipartBoundaryInputStreamTest and MultipartIterator for usage examples.
| フィールドの概要 | |
protected java.lang.String |
boundary
推奨されていません。 The boundary. |
private byte[] |
boundaryBytes
推奨されていません。 |
protected boolean |
boundaryEncountered
推奨されていません。 Whether or not the boundary has been encountered. |
protected long |
bytesRead
推奨されていません。 The total number of bytes read so far. |
private static byte |
CARRIAGE_RETURN
推奨されていません。 |
private static java.lang.String |
CONTENT_TYPE_APPLICATION_OCTET_STREAM
推奨されていません。 |
private static java.lang.String |
CONTENT_TYPE_TEXT_PLAIN
推奨されていません。 |
private static byte[] |
CRLF
推奨されていません。 |
private static java.lang.String |
DEFAULT_CONTENT_DISPOSITION
推奨されていません。 |
private static int |
DEFAULT_LINE_SIZE
推奨されていません。 |
private static java.lang.String |
DOUBLE_DASH_STRING
推奨されていません。 |
protected java.lang.String |
elementCharset
推奨されていません。 The character encoding of the element, specified in the element's Content-Type header. |
protected java.lang.String |
elementContentDisposition
推奨されていません。 The Content-Disposition for the current form element being read. |
protected java.lang.String |
elementContentType
推奨されていません。 The Content-Type of the current form element being read. |
protected java.lang.String |
elementFileName
推奨されていません。 The filename of the current form element being read, null if the current form element is
text data. |
protected java.lang.String |
elementName
推奨されていません。 The name of the current form element being read. |
protected boolean |
endOfStream
推奨されていません。 Whether or not the end of the stream has been read. |
private byte[] |
finalBoundaryBytes
推奨されていません。 |
protected boolean |
finalBoundaryEncountered
推奨されていません。 Whether or not the final boundary has been encountered. |
protected java.io.InputStream |
inputStream
推奨されていません。 The InputStream to read from. |
private byte[] |
line
推奨されていません。 |
private boolean |
lineHasCarriage
推奨されていません。 |
private boolean |
lineHasNewline
推奨されていません。 |
private int |
lineIndex
推奨されていません。 |
private int |
lineLength
推奨されていません。 |
private int |
lineSize
推奨されていません。 |
protected long |
maxLength
推奨されていません。 The maximum length in bytes to read from the stream at a time, or -1 for unlimited length. |
protected boolean |
maxLengthMet
推奨されていません。 Whether or not the maximum length has been met. |
private static java.lang.String |
MESSAGE_INVALID_START
推奨されていません。 |
private static byte |
NEWLINE_BYTE
推奨されていません。 |
private static java.lang.String |
PARAMETER_CHARSET
推奨されていません。 |
private static java.lang.String |
PARAMETER_FILENAME
推奨されていません。 |
private static java.lang.String |
PARAMETER_NAME
推奨されていません。 |
private static char |
TOKEN_COLON
推奨されていません。 |
private static java.lang.String |
TOKEN_EQUALS
推奨されていません。 |
private static char |
TOKEN_QUOTE
推奨されていません。 |
private static char |
TOKEN_SEMI_COLON
推奨されていません。 |
private static char |
TOKEN_SPACE
推奨されていません。 |
| クラス java.io.InputStream から継承したフィールド |
|
| コンストラクタの概要 | |
MultipartBoundaryInputStream()
推奨されていません。 |
|
| メソッドの概要 | |
private int |
availableInLine()
推奨されていません。 |
private void |
byteRead()
推奨されていません。 |
private java.lang.String |
checkAndFixFilename(java.lang.String filename)
推奨されていません。 |
private void |
checkForBoundary()
推奨されていません。 |
private boolean |
equals(byte[] comp,
int offset,
int length,
byte[] source)
推奨されていません。 Checks bytes for equality. |
private void |
fillLine()
推奨されていません。 |
private void |
fillLineBuffer()
推奨されていません。 |
long |
getBytesRead()
推奨されていません。 |
java.lang.String |
getElementCharset()
推奨されていません。 Gets the character encoding of the current element. |
java.lang.String |
getElementContentDisposition()
推奨されていません。 Gets the value for the "Content-Dispositio" header for the current multipart element. |
java.lang.String |
getElementContentType()
推奨されていません。 Gets the "Content-Type" of the current element. |
java.lang.String |
getElementFileName()
推奨されていません。 Gets the filename of the current element, which will be null if the current element isn't a file. |
java.lang.String |
getElementName()
推奨されていません。 Gets the name of the current element. |
long |
getMaxLength()
推奨されていません。 |
boolean |
isBoundaryEncountered()
推奨されていません。 Returns whether or not the boundary has been encountered while reading data. |
boolean |
isElementFile()
推奨されていません。 Gets whether or not the current form element being read is a file. |
boolean |
isEndOfStream()
推奨されていません。 Whether or not an EOF has been read on the stream. |
boolean |
isFinalBoundaryEncountered()
推奨されていません。 Returns whether or not the final boundary has been encountered. |
boolean |
isMaxLengthMet()
推奨されていません。 Whether or not the maximum length has been met. |
void |
mark(int i)
推奨されていません。 Marks the underlying stream. |
private java.lang.String |
parseForParameter(java.lang.String parameter,
java.lang.String parseString)
推奨されていません。 |
private java.lang.String |
parseHeaderValue(java.lang.String headerLine)
推奨されていません。 |
int |
read()
推奨されていません。 Reads from the stream. |
int |
read(byte[] buffer)
推奨されていません。 |
int |
read(byte[] buffer,
int offset,
int length)
推奨されていません。 |
private void |
readContentDisposition()
推奨されていません。 |
private boolean |
readContentType()
推奨されていません。 |
private void |
readElementHeaders()
推奨されていません。 |
private void |
readFirstElement()
推奨されていません。 |
private int |
readFromLine()
推奨されていません。 |
private java.lang.String |
readLine()
推奨されていません。 |
void |
reset()
推奨されていません。 Resets the underlying input stream. |
private void |
resetCrlf()
推奨されていません。 |
void |
resetForNextBoundary()
推奨されていません。 Resets this stream for use with the next element, to be used after a boundary is encountered. |
private void |
resetLine()
推奨されていません。 |
private void |
resetStream()
推奨されていません。 |
void |
setBoundary(java.lang.String boundary)
推奨されていません。 Sets the boundary that terminates the data for the stream, after adding the prefix "--" |
void |
setInputStream(java.io.InputStream stream)
推奨されていません。 Sets the input stream used to read multipart data. |
void |
setLineSize(int size)
推奨されていません。 |
void |
setMaxLength(long maxLength)
推奨されていません。 Set the maximum length in bytes to read, or -1 for an unlimited length. |
private void |
skipCurrentLineIfBlank()
推奨されていません。 |
| クラス java.io.InputStream から継承したメソッド |
available, close, markSupported, skip |
| クラス java.lang.Object から継承したメソッド |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| フィールドの詳細 |
private static final byte NEWLINE_BYTE
private static final byte CARRIAGE_RETURN
private static final byte[] CRLF
private static final java.lang.String DOUBLE_DASH_STRING
private static final int DEFAULT_LINE_SIZE
private static final java.lang.String TOKEN_EQUALS
private static final char TOKEN_QUOTE
private static final char TOKEN_COLON
private static final char TOKEN_SEMI_COLON
private static final char TOKEN_SPACE
private static final java.lang.String DEFAULT_CONTENT_DISPOSITION
private static final java.lang.String PARAMETER_NAME
private static final java.lang.String PARAMETER_FILENAME
private static final java.lang.String PARAMETER_CHARSET
private static final java.lang.String CONTENT_TYPE_TEXT_PLAIN
private static final java.lang.String CONTENT_TYPE_APPLICATION_OCTET_STREAM
private static final java.lang.String MESSAGE_INVALID_START
protected java.io.InputStream inputStream
protected java.lang.String boundary
protected boolean boundaryEncountered
protected boolean finalBoundaryEncountered
protected boolean endOfStream
protected java.lang.String elementContentDisposition
protected java.lang.String elementName
protected java.lang.String elementContentType
protected java.lang.String elementFileName
null if the current form element is
text data.
protected java.lang.String elementCharset
protected long maxLength
protected boolean maxLengthMet
protected long bytesRead
private byte[] boundaryBytes
private byte[] finalBoundaryBytes
private byte[] line
private int lineSize
private int lineLength
private boolean lineHasNewline
private boolean lineHasCarriage
private int lineIndex
| コンストラクタの詳細 |
public MultipartBoundaryInputStream()
| メソッドの詳細 |
public void setBoundary(java.lang.String boundary)
public void resetForNextBoundary()
throws java.io.IOException
java.io.IOException
public void setInputStream(java.io.InputStream stream)
throws java.io.IOException
java.io.IOException
public int read()
throws java.io.IOException
java.io.IOException
public int read(byte[] buffer)
throws java.io.IOException
java.io.IOException
public int read(byte[] buffer,
int offset,
int length)
throws java.io.IOException
java.io.IOExceptionpublic void mark(int i)
public void reset()
throws java.io.IOException
java.io.IOExceptionpublic void setMaxLength(long maxLength)
public long getMaxLength()
public boolean isMaxLengthMet()
public java.lang.String getElementContentDisposition()
public java.lang.String getElementName()
public java.lang.String getElementCharset()
public java.lang.String getElementContentType()
public java.lang.String getElementFileName()
public boolean isElementFile()
public boolean isBoundaryEncountered()
public boolean isFinalBoundaryEncountered()
public boolean isEndOfStream()
public void setLineSize(int size)
public long getBytesRead()
private final void readFirstElement()
throws java.io.IOException
java.io.IOException
private final void readElementHeaders()
throws java.io.IOException
java.io.IOException
private final void readContentDisposition()
throws java.io.IOException
java.io.IOExceptionprivate final java.lang.String checkAndFixFilename(java.lang.String filename)
private final java.lang.String parseForParameter(java.lang.String parameter,
java.lang.String parseString)
private final boolean readContentType()
throws java.io.IOException
java.io.IOExceptionprivate final java.lang.String parseHeaderValue(java.lang.String headerLine)
private final void skipCurrentLineIfBlank()
throws java.io.IOException
java.io.IOExceptionprivate final void resetCrlf()
private final void resetStream()
private final java.lang.String readLine()
throws java.io.IOException
java.io.IOException
private final int readFromLine()
throws java.io.IOException
java.io.IOExceptionprivate final int availableInLine()
private final void fillLine()
throws java.io.IOException
java.io.IOExceptionprivate final void resetLine()
private final void fillLineBuffer()
throws java.io.IOException
java.io.IOExceptionprivate final void byteRead()
private final void checkForBoundary()
private final boolean equals(byte[] comp,
int offset,
int length,
byte[] source)
comp - The byte to compare to sourceoffset - The offset to start at in complength - The length of comp to compare tosource - The reference byte array to test for equality
|
||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||