org.freehep.util.io
Class TaggedInputStream
java.lang.Object
java.io.InputStream
org.freehep.util.io.DecompressableInputStream
org.freehep.util.io.BitInputStream
org.freehep.util.io.ByteOrderInputStream
org.freehep.util.io.ByteCountInputStream
org.freehep.util.io.TaggedInputStream
- All Implemented Interfaces:
- DataInput
- Direct Known Subclasses:
- CGMInputStream, EMFInputStream, SWFInputStream
- public abstract class TaggedInputStream
- extends ByteCountInputStream
Class to read Tagged blocks from a Stream. The tagged blocks (Tags) contain
a tagID and a Length, so that known and unknown tags can be read and written
(using the TaggedOutputStream).
The stream also allows to read Actions, which again come with a actionCode and
a length.
A set of recognized Tags and Actions can be added to this stream.
A concrete implementation of this stream should decode/read the TagHeader.
All Concrete tags should be inherited from the Tag class and implement
their read methods.
- Version:
- $Id: TaggedInputStream.java,v 1.8 2001/11/20 17:11:54 duns Exp $
- Author:
- Mark Donszelmann, Charles Loomis
- Source Code:
- TaggedInputStream.java
Field Summary |
protected ActionSet |
actionSet
Set of actions that can be used by this Stream |
protected TagSet |
tagSet
Set of tags that can be used by this Stream |
Methods inherited from class org.freehep.util.io.ByteOrderInputStream |
readAsciiZString, readBoolean, readByte, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readInt, readLine, readLong, readShort, readShort, readString, readUnsignedByte, readUnsignedByte, readUnsignedInt, readUnsignedInt, readUnsignedShort, readUnsignedShort, readUTF, skipBytes |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
tagSet
protected TagSet tagSet
- Set of tags that can be used by this Stream
actionSet
protected ActionSet actionSet
- Set of actions that can be used by this Stream
TaggedInputStream
public TaggedInputStream(InputStream in,
TagSet tagSet,
ActionSet actionSet)
TaggedInputStream
public TaggedInputStream(InputStream in,
TagSet tagSet,
ActionSet actionSet,
boolean littleEndian)
addTag
public void addTag(Tag tag)
readTagHeader
protected abstract TagHeader readTagHeader()
throws IOException
- Decodes and returns the TagHeader, which includes a TagID and a length
- Throws:
IOException
readTag
public Tag readTag()
throws IOException
- Read a tag.
- Throws:
IOException
addAction
public void addAction(Action action)
readActionHeader
protected abstract ActionHeader readActionHeader()
throws IOException
- Decodes and returns the ActionHeader, which includes an actionCode and a length
- Throws:
IOException
readAction
public Action readAction()
throws IOException
- Throws:
IOException
Copyright © 2000-2004 FreeHEP, All Rights Reserved.