Re: Java I/O Seeking
On 28 Aug 2005 15:16:32 -0700, david.goodyear@xxxxxxxxx wrote or
quoted :
>I'm used to using streams in C++ where you can seek negatively, in
>java however it appears you can only seek positively. Does this mean a
>negative seek can only be achieved using a reset() and seek(with a
>positive argument), to have the effect of a negative seek. (Isn't
>that very in-efficient with buffers?)
Java does an absolute seek. The seek is relative to the start of the
file. So you can hop forward and back, you just specify it always
with a positive number.
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.
.
Relevant Pages
- Re: Do I have to close all streams from Process Class after using the Process object?
... I have to use Process proc = Runtime.getRuntime.execmethod to ... When I traced Java source code, ... My question is do I have to close all these streams ... runtime, final boolean strongRef, final boolean weakRef, final ... (comp.lang.java.programmer) - Re: Do I have to close all streams from Process Class after using the Process object?
... On Dec 17, 6:40 pm, External Concepts Guild ... When I traced Java source code, ... My question is do I have to close all these streams ... runtime, final boolean strongRef, final boolean weakRef, final ... (comp.lang.java.programmer) - Process.waitFor() returns, but threads reading output/error streams are blocked on read
... threads to read in the out/err streams, ... i'll include the java source below, but the problem seems extremely specific ... passed in on the command line). ... process is hung if i terminate the process the command line tool connects to ... (comp.lang.java.programmer) - Re: Too many open named pipes in a java process...
... Obviously you haven't closed all the streams you've opened in your ... recover external resources like file descriptors in a timely manner. ... Note that not all pipes are named pipes. ... program crashed in Java or in a native method. ... (comp.lang.java.help) - Re: Too many open named pipes in a java process...
... Obviously you haven't closed all the streams you've opened in your ... recover external resources like file descriptors in a timely manner. ... Note that not all pipes are named pipes. ... program crashed in Java or in a native method. ... (comp.lang.java.programmer) |
|