Class WriterResource

    • Constructor Detail

      • WriterResource

        public WriterResource​(Writer writer)
        Instantiates a new Writer resource.
        Parameters:
        writer - the writer
    • Method Detail

      • writer

        public Writer writer()
                      throws IOException
        Description copied from interface: Resource
        Opens a writer for writing for writing to the resource
        Specified by:
        writer in interface Resource
        Returns:
        A writer
        Throws:
        IOException - the io exception
      • append

        public Resource append​(byte[] byteArray)
                        throws IOException
        Description copied from interface: Resource

        Appends the given byte array content to the resource.

        Specified by:
        append in interface Resource
        Parameters:
        byteArray - The content to append
        Returns:
        the resource
        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.