org.apache.struts.upload
クラス BufferedMultipartInputStream

java.lang.Object
  拡張java.io.InputStream
      拡張org.apache.struts.upload.BufferedMultipartInputStream

推奨されていません。 Use the Commons FileUpload based multipart handler instead. This class will be removed after Struts 1.2.

public class BufferedMultipartInputStream
extends java.io.InputStream

This class implements buffering for an InputStream as well as a readLine method. The purpose of this is to provide a reliable readLine() method.


フィールドの概要
protected  byte[] buffer
          推奨されていません。 The byte array used to hold buffered data
protected  int bufferLength
          推奨されていません。 The number of bytes read from the underlying InputStream that are in the buffer
protected  int bufferOffset
          推奨されていません。 The current offset we're at in the buffer's byte array
protected  int bufferSize
          推奨されていません。 The size of the byte array buffer
protected  long contentLength
          推奨されていません。 The content length of the multipart data
protected  boolean contentLengthMet
          推奨されていません。 Whether or not bytes up to the Content-Length have been read
protected  java.io.InputStream inputStream
          推奨されていません。 The underlying InputStream used by this class
protected  boolean maxLengthMet
          推奨されていません。 Whether or not bytes up to the maximum length have been read
protected  long maxSize
          推奨されていません。 The maximum allowed size for the multipart data, or -1 for an unlimited maximum file length
protected  int totalLength
          推奨されていません。 The total number of bytes read so far
 
クラス java.io.InputStream から継承したフィールド
 
コンストラクタの概要
BufferedMultipartInputStream(java.io.InputStream inputStream, int bufferSize, long contentLength, long maxSize)
          推奨されていません。 Public constructor for this class, just wraps the InputStream given
 
メソッドの概要
 int available()
          推奨されていません。 This method returns the number of available bytes left to read in the buffer before it has to be refilled
 void close()
          推奨されていません。 This method attempts to close the underlying InputStream
 boolean contentLengthMet()
          推奨されていません。  
protected  void fill()
          推奨されていません。 Fills the buffer with data from the underlying inputStream.
 void mark(int position)
          推奨されていません。 This method calls on the mark() method of the underlying InputStream
 boolean markSupported()
          推奨されていません。 This method calls on the markSupported() method of the underlying InputStream
 boolean maxLengthMet()
          推奨されていません。  
 int read()
          推奨されていません。 This method returns the next byte in the buffer, and refills it if necessary.
 int read(byte[] b)
          推奨されていません。 This method populates the byte array b with data up to b.length bytes
 int read(byte[] b, int offset, int length)
          推奨されていません。 This method populates the byte array b with data up to length starting at b[offset]
 byte[] readLine()
          推奨されていません。 This method reads a line, regardless of length.
 int readLine(byte[] b, int offset, int length)
          推奨されていません。 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()
          推奨されていません。 This method makes a call to the reset() method of the underlying InputStream
 
クラス java.io.InputStream から継承したメソッド
skip
 
クラス java.lang.Object から継承したメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

フィールドの詳細

inputStream

protected java.io.InputStream inputStream
推奨されていません。 
The underlying InputStream used by this class


buffer

protected byte[] buffer
推奨されていません。 
The byte array used to hold buffered data


bufferOffset

protected int bufferOffset
推奨されていません。 
The current offset we're at in the buffer's byte array


bufferSize

protected int bufferSize
推奨されていません。 
The size of the byte array buffer


bufferLength

protected int bufferLength
推奨されていません。 
The number of bytes read from the underlying InputStream that are in the buffer


totalLength

protected int totalLength
推奨されていません。 
The total number of bytes read so far


contentLength

protected long contentLength
推奨されていません。 
The content length of the multipart data


maxSize

protected long maxSize
推奨されていません。 
The maximum allowed size for the multipart data, or -1 for an unlimited maximum file length


contentLengthMet

protected boolean contentLengthMet
推奨されていません。 
Whether or not bytes up to the Content-Length have been read


maxLengthMet

protected boolean maxLengthMet
推奨されていません。 
Whether or not bytes up to the maximum length have been read

コンストラクタの詳細

BufferedMultipartInputStream

public BufferedMultipartInputStream(java.io.InputStream inputStream,
                                    int bufferSize,
                                    long contentLength,
                                    long maxSize)
                             throws java.io.IOException
推奨されていません。 
Public constructor for this class, just wraps the InputStream given

パラメータ:
inputStream - The underlying stream to read from
bufferSize - The size in bytes of the internal buffer
contentLength - The content length for this request
maxSize - The maximum size in bytes that this multipart request can be, or -1 for an unlimited length
メソッドの詳細

available

public int available()
推奨されていません。 
This method returns the number of available bytes left to read in the buffer before it has to be refilled


close

public void close()
           throws java.io.IOException
推奨されていません。 
This method attempts to close the underlying InputStream

例外:
java.io.IOException

mark

public void mark(int position)
推奨されていません。 
This method calls on the mark() method of the underlying InputStream


markSupported

public boolean markSupported()
推奨されていません。 
This method calls on the markSupported() method of the underlying InputStream

戻り値:
Whether or not the underlying InputStream supports marking

maxLengthMet

public boolean maxLengthMet()
推奨されていません。 
戻り値:
true if the maximum length has been reached, false otherwise

contentLengthMet

public boolean contentLengthMet()
推奨されていません。 
戻り値:
true if the content length has been reached, false otherwise

read

public int read()
         throws java.io.IOException
推奨されていません。 
This method returns the next byte in the buffer, and refills it if necessary.

戻り値:
The next byte read in the buffer, or -1 if the end of the stream has been reached
例外:
java.io.IOException

read

public int read(byte[] b)
         throws java.io.IOException
推奨されていません。 
This method populates the byte array b with data up to b.length bytes

例外:
java.io.IOException

read

public int read(byte[] b,
                int offset,
                int length)
         throws java.io.IOException
推奨されていません。 
This method populates the byte array b with data up to length starting at b[offset]

例外:
java.io.IOException

readLine

public int readLine(byte[] b,
                    int offset,
                    int length)
             throws java.io.IOException
推奨されていません。 
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

例外:
java.io.IOException

readLine

public byte[] readLine()
                throws java.io.IOException
推奨されていません。 
This method reads a line, regardless of length.

戻り値:
A byte array representing the line.
例外:
java.io.IOException

reset

public void reset()
           throws java.io.IOException
推奨されていません。 
This method makes a call to the reset() method of the underlying InputStream

例外:
java.io.IOException

fill

protected void fill()
             throws java.io.IOException
推奨されていません。 
Fills the buffer with data from the underlying inputStream. If it can't fill the entire buffer in one read, it will read as many times as necessary to fill the buffer

例外:
java.io.IOException


このドキュメントは、Ja-Jakartaにより訳されました。コメントがある場合は、report@jajakarta.orgまでお願いします。
Copyright (C) 2000-2004 - Apache Software Foundation