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
Solved

What defines a markSupported()-stream?

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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying 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

Suggested Solutions

Title # Comments Views Activity
varialbe initialization 11 37
runtime exception 2 42
Running JavaFX on JDeveloper 12C 1 55
learn programming 8 41
By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
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…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…

861 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