Class ByteArraySource
java.lang.Object
com.invirgance.convirgance.source.ByteArraySource
- All Implemented Interfaces:
Source
A Source implementation that provides stream access to a byte array
- Author:
- jbanes
-
Constructor Summary
ConstructorsConstructorDescriptionByteArraySource(byte[] buffer) Creates a ByteArraySource with the provided buffer -
Method Summary
Modifier and TypeMethodDescriptionReturns an input stream over the wrapped bufferMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.invirgance.convirgance.source.Source
isReusable, isUsed, readString, readString
-
Constructor Details
-
ByteArraySource
public ByteArraySource(byte[] buffer) Creates a ByteArraySource with the provided buffer- Parameters:
buffer- an array of bytes to read from
-
-
Method Details
-
getInputStream
Returns an input stream over the wrapped buffer- Specified by:
getInputStreamin interfaceSource- Returns:
- an input stream
-