garydgregory commented on a change in pull request #59: Add ability to specify 
buffer sizes
URL: https://github.com/apache/commons-vfs/pull/59#discussion_r278121941
 
 

 ##########
 File path: commons-vfs2/src/main/java/org/apache/commons/vfs2/FileContent.java
 ##########
 @@ -194,6 +207,23 @@
      */
     OutputStream getOutputStream(boolean bAppend) throws FileSystemException;
 
+    /**
+     * Returns an output stream for writing the file's content.
+     * <p>
+     * If the file does not exist, this method creates it, and the parent 
folder, if necessary. If the file does exist,
+     * it is replaced with whatever is written to the output stream.
+     * <p>
+     * There may only be a single input or output stream open for the file at 
any time.
+     *
+     * @param bAppend true if you would like to append to the file. This may 
not be supported by all implementations.
+     * @param bufferSize The buffer size to use.
+     * @return An output stream to write the file's content to. The stream is 
buffered, so there is no need to wrap it
+     *         in a {@code BufferedOutputStream}.
+     * @throws FileSystemException If the file is read-only, or is being read, 
or is being written, or bAppend is true
+     *             and the implementation does not support it, or on error 
opening the stream.
+     */
+    OutputStream getOutputStream(boolean bAppend, int bufferSize) throws 
FileSystemException;
+
 
 Review comment:
   I think you need to make this a default method to avoid breaking 
compatibility.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to