|
||||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
java.lang.Objectjava.io.InputStream
java.io.FilterInputStream
java.io.BufferedInputStream
javax.mail.util.SharedFileInputStream
public final class SharedFileInputStream
SharedFileInputStream
は mark
と reset
メソッドをサポートし、
ファイルからデータをバッファリングする BufferedInputStream
です。
又、newStream
がファイルの部分集合を表す他のストリームを作成するメソッドをサポートします。
RandomAccessFile
オブジェクトは、ファイルデータにアクセスする為に使用されます。
フィールドの概要 | |
---|---|
protected long |
bufpos
The file offset that corresponds to the first byte in the read buffer. |
protected int |
bufsize
読込みバッファの標準サイズ |
protected long |
datalen
The amount of data in this subset of the file. |
protected RandomAccessFile |
in
データを含むファイル。 |
protected long |
start
The file offset of the start of data in this subset of the file. |
クラス java.io.BufferedInputStream から継承されたフィールド |
---|
buf, count, marklimit, markpos, pos |
コンストラクタの概要 | |
---|---|
SharedFileInputStream(File file)
Creates a SharedFileInputStream for the file. |
|
SharedFileInputStream(File file,
int size)
バッファサイズを指定して SharedFileInputStream を作成します。 |
|
SharedFileInputStream(String file)
指定されたファイル名の SharedFileInputStream を作成します。 |
|
SharedFileInputStream(String file,
int size)
バッファサイズを指定して SharedFileInputStream を作成します。 |
メソッドの概要 | |
---|---|
int |
available()
この入力ストリームからブロッキングなしで読む事ができるバイト数を返します。 |
void |
close()
Closes this input stream and releases any system resources associated with the stream. |
protected void |
finalize()
Force this stream to close. |
long |
getPosition()
Return the current position in the InputStream, as an offset from the beginning of the InputStream. |
void |
mark(int readlimit)
See the general contract of the mark
method of InputStream . |
boolean |
markSupported()
Tests if this input stream supports the mark
and reset methods. |
InputStream |
newStream(long start,
long end)
Return a new InputStream representing a subset of the data from this InputStream, starting at start (inclusive) up to end (exclusive). |
int |
read()
See the general contract of the read
method of InputStream . |
int |
read(byte[] b,
int off,
int len)
Reads bytes from this stream into the specified byte array, starting at the given offset. |
void |
reset()
See the general contract of the reset
method of InputStream . |
long |
skip(long n)
See the general contract of the skip method of InputStream . |
クラス java.io.FilterInputStream から継承されたメソッド |
---|
read |
クラス java.lang.Object から継承されたメソッド |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
フィールドの詳細 |
---|
protected RandomAccessFile in
protected int bufsize
protected long bufpos
protected long start
protected long datalen
コンストラクタの詳細 |
---|
public SharedFileInputStream(File file) throws IOException
file
- ファイル
IOException
public SharedFileInputStream(String file) throws IOException
SharedFileInputStream
を作成します。
file
- ファイル
IOException
public SharedFileInputStream(File file, int size) throws IOException
SharedFileInputStream
を作成します。
file
- ファイルsize
- バッファサイズ
IllegalArgumentException
- size
が 0
以下の場合
IOException
public SharedFileInputStream(String file, int size) throws IOException
SharedFileInputStream
を作成します。
file
- ファイルsize
- バッファサイズ
IllegalArgumentException
- size
が 0
以下の場合
IOException
メソッドの詳細 |
---|
public int read() throws IOException
read
method of InputStream
.
BufferedInputStream
内の read
-1
if the end of the stream is reached.
IOException
- 入出力例外が発生した場合public int read(byte[] b, int off, int len) throws IOException
This method implements the general contract of the corresponding
method of the read
class.
InputStream
BufferedInputStream
内の read
b
- destination buffer.off
- offset at which to start storing bytes.len
- maximum number of bytes to read.
-1
if the end of
the stream has been reached.
IOException
- 入出力例外が発生した場合public long skip(long n) throws IOException
skip
method of InputStream
.
BufferedInputStream
内の skip
n
- the number of bytes to be skipped.
IOException
- 入出力例外が発生した場合public int available() throws IOException
BufferedInputStream
内の available
IOException
- 入出力例外が発生した場合public void mark(int readlimit)
mark
method of InputStream
.
BufferedInputStream
内の mark
readlimit
- the maximum limit of bytes that can be read before
the mark position becomes invalid.reset()
public void reset() throws IOException
reset
method of InputStream
.
If markpos
is -1
(no mark has been set or the mark has been
invalidated), an IOException
is thrown. Otherwise, pos
is
set equal to markpos
.
BufferedInputStream
内の reset
IOException
- if this stream has not been marked or
if the mark has been invalidated.mark(int)
public boolean markSupported()
mark
and reset
methods. The markSupported
method of SharedFileInputStream
returns
true
.
BufferedInputStream
内の markSupported
boolean
indicating if this stream type supports
the mark
and reset
methods.InputStream.mark(int)
,
InputStream.reset()
public void close() throws IOException
Closeable
内の close
BufferedInputStream
内の close
IOException
- 入出力例外が発生した場合public long getPosition()
SharedInputStream
内の getPosition
public InputStream newStream(long start, long end)
SharedInputStream
内の newStream
start
- 開始位置end
- 終了位置 + 1
protected void finalize() throws Throwable
Object
内の finalize
Throwable
|
||||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |