Class PathBinaryReadable

  • All Implemented Interfaces:
    BinaryReadable

    public class PathBinaryReadable
    extends java.lang.Object
    implements BinaryReadable
    An implementation of BinaryReadable which delegates to a Path.
    Since:
    3.2-ALPHA-12
    Author:
    Fabrizio Giudici
    Status: stable API
    • Constructor Summary

      Constructors 
      Constructor Description
      PathBinaryReadable​(java.nio.file.Path path, java.nio.file.OpenOption... openOptions)
      Creates an instance with the given path and options.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.io.InputStream openStream()
      Returns an InputStream to read from the object.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PathBinaryReadable

        public PathBinaryReadable​(@Nonnull
                                  java.nio.file.Path path,
                                  @Nonnull
                                  java.nio.file.OpenOption... openOptions)
        Creates an instance with the given path and options.
        Parameters:
        path - the path to open
        openOptions - open options
    • Method Detail

      • openStream

        @Nonnull
        public java.io.InputStream openStream()
                                       throws java.io.IOException
        Returns an InputStream to read from the object.
        Specified by:
        openStream in interface BinaryReadable
        Returns:
        the InputStream
        Throws:
        java.io.IOException - if the operation can't be performed