org.freehep.util.io
Class Tag
- java.lang.Object
-
- org.freehep.util.io.Tag
-
- Direct Known Subclasses:
- UndefinedTag
public abstract class Tag extends java.lang.ObjectGeneric 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.
-
-
Field Summary
Fields Modifier and Type Field and Description static intDEFAULT_TAGThis is the tagID for the default tag handler.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method and Description java.lang.StringgetName()Get the tag name.intgetTag()Get the tag number.intgetTagType()This returns the type of blockintgetVersion()Get the version number.abstract Tagread(int tagID, TaggedInputStream input, int len)This reads the information from the given input and returns a new Tagabstract java.lang.StringtoString()abstract voidwrite(int tagID, TaggedOutputStream output)This writes the information to the given output
-
-
-
Field Detail
-
DEFAULT_TAG
public static final int DEFAULT_TAG
This is the tagID for the default tag handler.- See Also:
- Constant Field Values
-
-
Method Detail
-
getTag
public int getTag()
Get the tag number.- Returns:
- tagID
-
getVersion
public int getVersion()
Get the version number.- Returns:
- version number
-
getName
public java.lang.String getName()
Get the tag name.- Returns:
- tag name
-
getTagType
public int getTagType()
This returns the type of block- Returns:
- tag type
-
read
public abstract Tag read(int tagID, TaggedInputStream input, int len) throws java.io.IOException
This reads the information from the given input and returns a new Tag- Parameters:
tagID- id of the tag to readinput- stream to read fromlen- length to read- Returns:
- read Tag
- Throws:
java.io.IOException- if read fails
-
write
public abstract void write(int tagID, TaggedOutputStream output) throws java.io.IOExceptionThis writes the information to the given output- Parameters:
tagID- id of tag to writeoutput- stream to write to- Throws:
java.io.IOException- if write fails
-
toString
public abstract java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-
DMelt 3.0 © DataMelt by jWork.ORG