commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bernd Eckenfels (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (VFS-373) Add FileContent write APIs
Date Wed, 31 Dec 2014 05:49:13 GMT

     [ https://issues.apache.org/jira/browse/VFS-373?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Bernd Eckenfels updated VFS-373:
--------------------------------
    Fix Version/s:     (was: Nightly Builds)
                   2.1

> Add FileContent write APIs
> --------------------------
>
>                 Key: VFS-373
>                 URL: https://issues.apache.org/jira/browse/VFS-373
>             Project: Commons VFS
>          Issue Type: New Feature
>    Affects Versions: 1.0, 2.0
>         Environment: Apache Maven 3.0.3 (r1075438; 2011-02-28 12:31:09-0500)
> Maven home: C:\Java\apache-maven-3.0.3\bin\..
> Java version: 1.6.0_29, vendor: Sun Microsystems Inc.
> Java home: C:\Program Files\Java\jdk1.6.0_29\jre
> Default locale: en_US, platform encoding: Cp1252
> OS name: "windows 7", version: "6.1", arch: "amd64", family: "windows"
>            Reporter: Gary Gregory
>            Assignee: Gary Gregory
>             Fix For: 2.1
>
>
> Add APIs to write FileContent objects to an OutputStream, FileContent, and FileObject.
> In 1.0, 2.0, all writing must be done manually via FileContent#getOutputStream() or FileUtil.

> Make writing a first class citizen in the API. 
> Make FileUtil reuse the new FileContent API.
> {code:java}
> write(FileContent)
> write(FileObject)
> write(OutputStream)
> write(OutputStream, int)
> {code}
> In more detail:
> {code:java}
>     /**
>      * Writes this content to another FileContent.
>      * 
>      * @param output
>      *            The target OutputStream.
>      * @throws IOException
>      *             if an error occurs writing the content.
>      * @since 2.1             
>      */
>     long write(FileContent output) throws IOException;
>     
>     /**
>      * Writes this content to another FileObject.
>      * 
>      * @param file
>      *            The target FileObject.
>      * @throws IOException
>      *             if an error occurs writing the content.
>      * @since 2.1             
>      */
>     long write(FileObject file) throws IOException;
>     
>     /**
>      * Writes this content to an OutputStream.
>      * 
>      * @param output
>      *            The target OutputStream.
>      * @throws IOException
>      *             if an error occurs writing the content.
>      * @since 2.1             
>      */
>     long write(OutputStream output) throws IOException;
>     
>     /**
>      * Writes this content to an OutputStream.
>      * 
>      * @param output
>      *            The target OutputStream.
>      * @param bufferSize
>      *            The buffer size to write data chunks.
>      * @throws IOException
>      *             if an error occurs writing the file.
>      * @since 2.1             
>      */
>     long write(OutputStream output, int bufferSize) throws IOException;
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message