Class ByteContentSourceReader<T extends ByteContent>

java.lang.Object
org.midheaven.io.ByteContentSourceReader<T>
Type Parameters:
T - type of ByteContent this reader will read

public class ByteContentSourceReader<T extends ByteContent> extends Object
Represents Byte Content Source Reader.
  • Method Details

    • empty

      public T empty()
      Returns an empty instance.
      Returns:
      the result of empty
    • from

      public T from(byte[] bytes)
      Creates an instance from the provided source.
      Parameters:
      bytes - the bytes value
      Returns:
      the result of from
    • from

      public T from(String text)
      Creates an instance from the provided source.
      Parameters:
      text - the text value
      Returns:
      the result of from
    • from

      public T from(InputStream inputStream)
      Creates an instance from the provided source.
      Parameters:
      inputStream - the inputStream value
      Returns:
      the result of from
    • embeddedResource

      public T embeddedResource(String resourcePath)
      Performs embeddedResource.
      Parameters:
      resourcePath - the resourcePath value
      Returns:
      the result of embeddedResource