Solved

What defines a markSupported()-stream?

Posted on 1997-06-10
2
190 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
2 Comments
 

Accepted Solution

by:
vanegas earned 100 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
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 …
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…

685 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