Change index positioning in InputStream

I have a binary file containing the keys, and after each key there is an image associated with it. I want to jump from different keys, but could not find any method that changes the positioning of the index in the input stream. I saw the method mark(), but it does not jump in different places.

Does anyone know how to do this?

+5
source share
1 answer

There is a long skip(long n)method that you can use:

n . skip , , 0. ; , n , . . n , .

, , n , . , " ", markSupported(), reset(), skip , .


java.io.RandomAccessFile, , , seek(long pos).

, , Java Advanced Imaging, com.sun.media.jai.codec.FileSeekableStream, SeekableStream, File RandomAccessFile, , JAI API. JAI.

+6

All Articles