Author: ggregory Date: Thu May 17 15:32:24 2012 New Revision: 1339654 URL: http://svn.apache.org/viewvc?rev=1339654&view=rev Log: Sort methods in AB-order.
Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/RandomAccessContent.java Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/RandomAccessContent.java URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/RandomAccessContent.java?rev=1339654&r1=1339653&r2=1339654&view=diff ============================================================================== --- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/RandomAccessContent.java (original) +++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/RandomAccessContent.java Thu May 17 15:32:24 2012 @@ -27,6 +27,20 @@ import java.io.InputStream; public interface RandomAccessContent extends DataOutput, DataInput { /** + * Closes this random access file stream and releases any system resources associated with the stream. </p> + * <p> + * A closed random access file cannot perform input or output operations and cannot be reopened. + * </p> + * <p> + * If this file has an associated channel then the channel is closed as well. + * <p> + * + * @throws IOException + * if an I/O error occurs. + */ + void close() throws IOException; + + /** * Returns the current offset in this file. * * @return the offset from the beginning of the file, in bytes, at which the next read or write occurs. @@ -36,24 +50,16 @@ public interface RandomAccessContent ext long getFilePointer() throws IOException; /** - * Sets the file-pointer offset, measured from the beginning of this file, at which the next read or write occurs. - * <p> - * The offset may be set beyond the end of the file. Setting the offset beyond the end of the file does not change - * the file length. The file length will change only by writing after the offset has been set beyond the end of the - * file. - * </p> + * Get the input stream. * <p> - * <b>Notice: If you use {@link #getInputStream()} you have to re-get the InputStream after calling - * {@link #seek(long)}</b> + * <b>Notice: If you use {@link #seek(long)} you have to re-get the InputStream</b> * </p> * - * @param pos - * the offset position, measured in bytes from the beginning of the file, at which to set the file - * pointer. + * @return the InputStream. * @throws IOException - * if <code>pos</code> is less than <code>0</code> or if an I/O error occurs. + * if an I/O error occurs. */ - void seek(long pos) throws IOException; + InputStream getInputStream() throws IOException; /** * Returns the length of this file. @@ -65,28 +71,22 @@ public interface RandomAccessContent ext long length() throws IOException; /** - * Closes this random access file stream and releases any system resources associated with the stream. </p> + * Sets the file-pointer offset, measured from the beginning of this file, at which the next read or write occurs. * <p> - * A closed random access file cannot perform input or output operations and cannot be reopened. + * The offset may be set beyond the end of the file. Setting the offset beyond the end of the file does not change + * the file length. The file length will change only by writing after the offset has been set beyond the end of the + * file. * </p> * <p> - * If this file has an associated channel then the channel is closed as well. - * <p> - * - * @throws IOException - * if an I/O error occurs. - */ - void close() throws IOException; - - /** - * Get the input stream. - * <p> - * <b>Notice: If you use {@link #seek(long)} you have to re-get the InputStream</b> + * <b>Notice: If you use {@link #getInputStream()} you have to re-get the InputStream after calling + * {@link #seek(long)}</b> * </p> * - * @return the InputStream. + * @param pos + * the offset position, measured in bytes from the beginning of the file, at which to set the file + * pointer. * @throws IOException - * if an I/O error occurs. + * if <code>pos</code> is less than <code>0</code> or if an I/O error occurs. */ - InputStream getInputStream() throws IOException; + void seek(long pos) throws IOException; }