?
Solved

What defines a markSupported()-stream?

Posted on 1997-06-10
2
Medium Priority
?
193 Views
Last Modified: 2006-11-17
When is it possible to use the mark()-method on a stream, i.e. how do I have to define (new?) a stream to be able to set a mark in it? I have a stream that I want to scroll back in (it is a movie with frames). It would be great if you could go back to the previous frame(picture) in the stream by having set the mark at the beginning and, reset() to the mark and skip to the correct oofset (i.e. the previous picture).
0
Comment
Question by:jonte
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 

Accepted Solution

by:
vanegas earned 200 total points
ID: 1221474
It all depends which particular subclass of lang.io.InputStream or of lang.io.Reader is in question.  BufferedReader, for example, does support marking and so its markSupported() always returns true.

If the class of the stream which feeds you frames does not support marking, you might consider wrapping it with a BufferedInputStream object.

0
 

Author Comment

by:jonte
ID: 1221475
OK, thanks for your answer. I found that the RandomAccessFile-class with its seek(offset)-method will work out for me.

Jonas
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.
Suggested Courses
Course of the Month12 days, 22 hours left to enroll

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question