Package com.cedarsoftware.util
Class FastByteArrayInputStream
java.lang.Object
java.io.InputStream
com.cedarsoftware.util.FastByteArrayInputStream
- All Implemented Interfaces:
Closeable,AutoCloseable
Faster version of ByteArrayInputStream that does not have synchronized methods.
- Author:
- John DeRegnaucourt ([email protected])
Copyright (c) Cedar Software LLC
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
License
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.io.InputStream
nullInputStream, read, readAllBytes, readNBytes, readNBytes, skipNBytes, transferTo
-
Constructor Details
-
FastByteArrayInputStream
public FastByteArrayInputStream(byte[] buf)
-
-
Method Details
-
read
public int read()- Specified by:
readin classInputStream
-
read
public int read(byte[] b, int off, int len) - Overrides:
readin classInputStream
-
skip
public long skip(long n) - Overrides:
skipin classInputStream
-
available
public int available()- Overrides:
availablein classInputStream
-
mark
public void mark(int readLimit) - Overrides:
markin classInputStream
-
reset
public void reset()- Overrides:
resetin classInputStream
-
markSupported
public boolean markSupported()- Overrides:
markSupportedin classInputStream
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classInputStream
-