Class ByteBufferInputStreamProvider
- java.lang.Object
-
- com.helger.commons.io.streamprovider.ByteBufferInputStreamProvider
-
- All Implemented Interfaces:
IHasInputStream,IHasInputStreamAndReader
public class ByteBufferInputStreamProvider extends Object implements IHasInputStreamAndReader
AnInputStreamprovider based on aByteBuffer.- Author:
- Philip Helger
-
-
Constructor Summary
Constructors Constructor Description ByteBufferInputStreamProvider(ByteBuffer aBuffer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ByteBuffergetByteBuffer()ByteBufferInputStreamgetInputStream()Get the input stream to read from the object.booleanisReadMultiple()Check if theInputStreamfromIHasInputStream.getInputStream()andIHasInputStream.getBufferedInputStream()can be acquired more than once.StringtoString()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.helger.commons.io.IHasInputStream
getBufferedInputStream
-
Methods inherited from interface com.helger.commons.io.IHasInputStreamAndReader
getBufferedReader, getReader
-
-
-
-
Constructor Detail
-
ByteBufferInputStreamProvider
public ByteBufferInputStreamProvider(@Nonnull ByteBuffer aBuffer)
-
-
Method Detail
-
getByteBuffer
@Nonnull @ReturnsMutableObject public final ByteBuffer getByteBuffer()
-
getInputStream
@Nonnull public final ByteBufferInputStream getInputStream()
Description copied from interface:IHasInputStreamGet the input stream to read from the object. Each time this method is called, a newInputStreamneeds to be created.- Specified by:
getInputStreamin interfaceIHasInputStream- Returns:
nullif resolving failed.
-
isReadMultiple
public final boolean isReadMultiple()
Description copied from interface:IHasInputStreamCheck if theInputStreamfromIHasInputStream.getInputStream()andIHasInputStream.getBufferedInputStream()can be acquired more than once.- Specified by:
isReadMultiplein interfaceIHasInputStream- Returns:
trueif the input stream can be acquired more than once,falseif not.
-
-