类 FastByteArrayOutputStream.FastByteArrayInputStream
java.lang.Object
java.io.InputStream
cn.taketoday.util.FastByteArrayOutputStream.UpdateMessageDigestInputStream
cn.taketoday.util.FastByteArrayOutputStream.FastByteArrayInputStream
- 所有已实现的接口:
Closeable,AutoCloseable
private static final class FastByteArrayOutputStream.FastByteArrayInputStream
extends FastByteArrayOutputStream.UpdateMessageDigestInputStream
An implementation of
InputStream that reads from a given
FastByteArrayOutputStream.-
字段概要
字段修饰符和类型字段说明private final Iterator<byte[]>private byte[]private intprivate final FastByteArrayOutputStreamprivate intprivate int -
构造器概要
构造器构造器说明FastByteArrayInputStream(FastByteArrayOutputStream outputStream) Create a newFastByteArrayOutputStreamInputStreambacked by the givenFastByteArrayOutputStream. -
方法概要
修饰符和类型方法说明intintread()intread(byte[] b) intread(byte[] b, int off, int len) longskip(long n) private voidvoidupdateMessageDigest(MessageDigest messageDigest) Update the message digest with the remaining bytes in this stream.voidupdateMessageDigest(MessageDigest messageDigest, int len) Update the message digest with the next len bytes in this stream.从类继承的方法 java.io.InputStream
close, mark, markSupported, nullInputStream, readAllBytes, readNBytes, readNBytes, reset, skipNBytes, transferTo
-
字段详细资料
-
fastByteArrayOutputStream
-
buffersIterator
-
currentBuffer
-
currentBufferLength
private int currentBufferLength -
nextIndexInCurrentBuffer
private int nextIndexInCurrentBuffer -
totalBytesRead
private int totalBytesRead
-
-
构造器详细资料
-
FastByteArrayInputStream
Create a newFastByteArrayOutputStreamInputStreambacked by the givenFastByteArrayOutputStream.
-
-
方法详细资料
-
read
public int read()- 指定者:
read在类中InputStream
-
read
- 覆盖:
read在类中InputStream
-
read
- 覆盖:
read在类中InputStream
-
skip
- 覆盖:
skip在类中InputStream- 抛出:
IOException
-
available
public int available()- 覆盖:
available在类中InputStream
-
updateMessageDigest
Update the message digest with the remaining bytes in this stream.- 覆盖:
updateMessageDigest在类中FastByteArrayOutputStream.UpdateMessageDigestInputStream- 参数:
messageDigest- the message digest to update
-
updateMessageDigest
Update the message digest with the next len bytes in this stream. Avoids creating new byte arrays and use internal buffers for performance.- 覆盖:
updateMessageDigest在类中FastByteArrayOutputStream.UpdateMessageDigestInputStream- 参数:
messageDigest- the message digest to updatelen- how many bytes to read from this stream and use to update the message digest
-
updateCurrentBufferLength
private void updateCurrentBufferLength()
-