public class RepeatableInputStream extends InputStream
注意: ファイル読み込みの繰り返しに関しては、このクラスではなく
RepeatableFileInputStream
を使用してください。ファイルベースの
繰り返しでは、なんの制限もありません
Constructor and Description |
---|
RepeatableInputStream(InputStream inputStream,
int bufferSize)
他のInputStreamを元に、繰り返し可能なInputStreamを構築します
|
Modifier and Type | Method and Description |
---|---|
int |
available() |
void |
close() |
InputStream |
getWrappedInputStream() |
void |
mark(int readlimit)
このメソッドはInputStreamから読み込んだデータがバッファのサイズ制限より
小さい場合にのみ使用可能です。readLimitパラメタは無視されます。
|
boolean |
markSupported() |
int |
read() |
int |
read(byte[] out,
int outOffset,
int outLength) |
void |
reset()
有効なバッファの先頭までInputStreamをリセットします
|
read, skip
public RepeatableInputStream(InputStream inputStream, int bufferSize)
inputStream
- ラップするInputStream 読み込みデータはバッファの制限値まで
バッファされます。bufferSize
- バッファの制限値(バイト数)public void reset() throws IOException
reset
in class InputStream
IOException
- 有効なバッファサイズを超過している場合
これは、InputStremのデータが繰り返せない場合などpublic boolean markSupported()
markSupported
in class InputStream
public void mark(int readlimit)
mark
in class InputStream
public int available() throws IOException
available
in class InputStream
IOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class InputStream
IOException
public int read(byte[] out, int outOffset, int outLength) throws IOException
read
in class InputStream
IOException
public int read() throws IOException
read
in class InputStream
IOException
public InputStream getWrappedInputStream()
Copyright © 2018. All rights reserved.