public static interface Tailer.RandomAccessResourceBridge extends Closeable
| Modifier and Type | Method and Description |
|---|---|
long |
getPointer()
Gets the current offset in this tailable.
|
int |
read(byte[] b)
Reads up to
b.length bytes of data from this tailable into an array of bytes. |
void |
seek(long pos)
Sets the file-pointer offset, measured from the beginning of this tailable, at which the next read or write occurs.
|
long getPointer() throws IOException
IOException - if an I/O error occurs.int read(byte[] b) throws IOException
b.length bytes of data from this tailable into an array of bytes. This method blocks until at
least one byte of input is available.b - the buffer into which the data is read.-1 if there is no more data because the end of
this tailable has been reached.IOException - If the first byte cannot be read for any reason other than end of tailable, or if the random
access tailable has been closed, or if some other I/O error occurs.void seek(long pos) throws IOException
pos - the offset position, measured in bytes from the beginning of the tailable, at which to set the tailable
pointer.IOException - if pos is less than 0 or if an I/O error occurs.Copyright © 2002–2023 The Apache Software Foundation. All rights reserved.