Class ByteArraySource

java.lang.Object
com.invirgance.convirgance.source.ByteArraySource
All Implemented Interfaces:
Source

public class ByteArraySource extends Object implements Source
A Source implementation that provides stream access to a byte array
Author:
jbanes
  • 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

      public InputStream getInputStream()
      Returns an input stream over the wrapped buffer
      Specified by:
      getInputStream in interface Source
      Returns:
      an input stream