Package org.apache.commons.io.input
Class UnsynchronizedByteArrayInputStream
java.lang.Object
java.io.InputStream
org.apache.commons.io.input.UnsynchronizedByteArrayInputStream
- All Implemented Interfaces:
- Closeable,- AutoCloseable
This is an alternative to 
ByteArrayInputStream which removes the synchronization overhead for non-concurrent access; as such this class is
 not thread-safe.
 
 To build an instance, use UnsynchronizedByteArrayInputStream.Builder.
 
- Since:
- 2.7
- See Also:
- 
Nested Class SummaryNested Classes
- 
Field SummaryFields
- 
Constructor SummaryConstructorsConstructorDescriptionUnsynchronizedByteArrayInputStream(byte[] data) Deprecated.UnsynchronizedByteArrayInputStream(byte[] data, int offset) Deprecated.UnsynchronizedByteArrayInputStream(byte[] data, int offset, int length) Deprecated.
- 
Method SummaryMethods inherited from class java.io.InputStreamclose
- 
Field Details- 
END_OF_STREAMThe end of stream marker.- See Also:
 
 
- 
- 
Constructor Details- 
UnsynchronizedByteArrayInputStreamDeprecated.Constructs a new byte array input stream.- Parameters:
- data- the buffer
 
- 
UnsynchronizedByteArrayInputStreamDeprecated.Constructs a new byte array input stream.- Parameters:
- data- the buffer
- offset- the offset into the buffer
- Throws:
- IllegalArgumentException- if the offset is less than zero
 
- 
UnsynchronizedByteArrayInputStreamDeprecated.Constructs a new byte array input stream.- Parameters:
- data- the buffer
- offset- the offset into the buffer
- length- the length of the buffer
- Throws:
- IllegalArgumentException- if the offset or length less than zero
 
 
- 
- 
Method Details- 
builderConstructs a newUnsynchronizedByteArrayInputStream.Builder.- Returns:
- a new UnsynchronizedByteArrayInputStream.Builder.
 
- 
available- Overrides:
- availablein class- InputStream
 
- 
mark- Overrides:
- markin class- InputStream
 
- 
markSupported- Overrides:
- markSupportedin class- InputStream
 
- 
read- Specified by:
- readin class- InputStream
 
- 
read- Overrides:
- readin class- InputStream
 
- 
read- Overrides:
- readin class- InputStream
 
- 
reset- Overrides:
- resetin class- InputStream
 
- 
skip- Overrides:
- skipin class- InputStream
 
 
- 
builder(),UnsynchronizedByteArrayInputStream.Builder, andUnsynchronizedByteArrayInputStream.Builder.get().