FreeHEP API
Version current

org.freehep.util.io
Class Tag

java.lang.Object
  extended byorg.freehep.util.io.Tag
Direct Known Subclasses:
CGMTag, EMFTag, SWFTag, UndefinedTag

public abstract class Tag
extends Object

Generic Tag to be used by TaggedIn/OutputStreams. The tag contains an ID, name and a version. Concrete subclasses should implement the IO Read and Write methods.

Version:
$Id: Tag.java,v 1.4 2002/07/26 06:44:32 duns Exp $
Author:
Mark Donszelmann, Charles Loomis
Source Code:
Tag.java

Field Summary
static int DEFAULT_TAG
          This is the tagID for the default tag handler.
 
Constructor Summary
protected Tag(int tagID, int version)
           
 
Method Summary
 String getName()
          Get the tag name.
 int getTag()
          Get the tag number.
 int getTagType()
          This returns the type of block
 int getVersion()
          Get the version number.
abstract  Tag read(int tagID, TaggedInputStream input, int len)
          This reads the information from the given input and returns a new Tag
abstract  String toString()
           
abstract  void write(int tagID, TaggedOutputStream output)
          This writes the information to the given output
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_TAG

public static final int DEFAULT_TAG
This is the tagID for the default tag handler.

See Also:
Constant Field Values
Constructor Detail

Tag

protected Tag(int tagID,
              int version)
Method Detail

getTag

public int getTag()
Get the tag number.


getVersion

public int getVersion()
Get the version number.


getName

public String getName()
Get the tag name.


getTagType

public int getTagType()
This returns the type of block


read

public abstract Tag read(int tagID,
                         TaggedInputStream input,
                         int len)
                  throws IOException
This reads the information from the given input and returns a new Tag

Throws:
IOException

write

public abstract void write(int tagID,
                           TaggedOutputStream output)
                    throws IOException
This writes the information to the given output

Throws:
IOException

toString

public abstract String toString()

FreeHEP API
Version current

Copyright © 2000-2004 FreeHEP, All Rights Reserved.