Class ReaderResource

    • Constructor Detail

      • ReaderResource

        public ReaderResource​(Reader reader)
        Instantiates a new Reader resource.
        Parameters:
        reader - the reader to wrap
    • Method Detail

      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • reader

        public Reader reader()
                      throws IOException
        Description copied from interface: Resource
        Opens a reader using guessing the encoding and falling back to the default on the resource.
        Specified by:
        reader in interface Resource
        Returns:
        A reader
        Throws:
        IOException - the io exception
      • exists

        public boolean exists()
        Description copied from interface: Resource
        Exists boolean.
        Specified by:
        exists in interface Resource
        Returns:
        True if the resource exists, False if the resource does not exist.
      • readBytes

        public byte[] readBytes()
                         throws IOException
        Description copied from interface: Resource

        Reads the resource into an array of bytes.

        Specified by:
        readBytes in interface Resource
        Returns:
        An array of bytes representing the content of the resource.
        Throws:
        IOException - the io exception