Elliotte Rusty Harold created IO-834:
----------------------------------------

             Summary: AbstractOrigin getReader/getWriter etc, should be abstract
                 Key: IO-834
                 URL: https://issues.apache.org/jira/browse/IO-834
             Project: Commons IO
          Issue Type: Bug
            Reporter: Elliotte Rusty Harold


Many methods in thsi base class have no useful default implementation. E.g.

    public Writer getWriter(final Charset charset, final OpenOption... options) 
throws IOException {
        return Files.newBufferedWriter(getPath(), charset, options);
    }

This only works for files, but not for URIs, char sequences, byte sequences, 
etc. The file based methods should be pushed down into FileOrigin/PathOrigin 
and these methods should be abstract.

To avoid breaking API they can for now throw UnsuportedOperationException 
instead. 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to