Skip to content

Commit 9dabafa

Browse files
committed
DataHandle: relocate the seek method
It is the mutator which goes with offset(), so should be adjacent to it.
1 parent b948c95 commit 9dabafa

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

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

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

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

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

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

0 commit comments

Comments
 (0)