Skip to content

Commit 783ee18

Browse files
ctruedengab1one
authored andcommitted
DataHandle: relocate the seek method
It is the mutator which goes with offset(), so should be adjacent to it.
1 parent fc5b575 commit 783ee18

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/main/java/org/scijava/io/DataHandle.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,12 @@ public interface DataHandle<L extends Location> extends WrapperPlugin<L>,
6363
/** Returns the current offset in the stream. */
6464
long offset() throws IOException;
6565

66+
/**
67+
* Sets the stream offset, measured from the beginning of the stream, at which
68+
* the next read or write occurs.
69+
*/
70+
void seek(long pos) throws IOException;
71+
6672
/** Returns the length of the stream. */
6773
long length() throws IOException;
6874

@@ -174,12 +180,6 @@ default int read(final ByteBuffer buf, final int len) throws IOException {
174180
return n;
175181
}
176182

177-
/**
178-
* Sets the stream offset, measured from the beginning of the stream, at which
179-
* the next read or write occurs.
180-
*/
181-
void seek(long pos) throws IOException;
182-
183183
/**
184184
* Writes up to {@code buf.remaining()} bytes of data from the given
185185
* {@link ByteBuffer} to the stream.

0 commit comments

Comments
 (0)