org.freehep.util.io
Class UndefinedTag

java.lang.Object
  extended by org.freehep.util.io.Tag
      extended by org.freehep.util.io.UndefinedTag

public class UndefinedTag
extends Tag

Tag to hold the data for an Undefined Tag for the TaggedIn/OutputStreams. The data is read in and written as the number of bytes is known.

Version:
$Id: UndefinedTag.java 8584 2006-08-10 23:06:37Z duns $
Author:
Mark Donszelmann, Charles Loomis

Field Summary
 
Fields inherited from class org.freehep.util.io.Tag
DEFAULT_TAG
 
Constructor Summary
UndefinedTag()
          Create Undefined Tag with 0 length.
UndefinedTag(int tagID, int[] bytes)
          Create Undefined Tag.
 
Method Summary
 int getTagType()
          This returns the type of block
 Tag read(int tagID, TaggedInputStream input, int len)
          This reads the information from the given input and returns a new Tag
 String toString()
           
 void write(int tagID, TaggedOutputStream output)
          This writes the information to the given output
 
Methods inherited from class org.freehep.util.io.Tag
getName, getTag, getVersion
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

UndefinedTag

public UndefinedTag()
Create Undefined Tag with 0 length.


UndefinedTag

public UndefinedTag(int tagID,
                    int[] bytes)
Create Undefined Tag.

Parameters:
tagID - undefined tagID
bytes - bytes that follow the undefined tag
Method Detail

getTagType

public int getTagType()
Description copied from class: Tag
This returns the type of block

Overrides:
getTagType in class Tag
Returns:
tag type

read

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

Specified by:
read in class Tag
Parameters:
tagID - id of the tag to read
input - stream to read from
len - length to read
Returns:
read Tag
Throws:
IOException - if read fails

write

public void write(int tagID,
                  TaggedOutputStream output)
           throws IOException
Description copied from class: Tag
This writes the information to the given output

Specified by:
write in class Tag
Parameters:
tagID - id of tag to write
output - stream to write to
Throws:
IOException - if write fails

toString

public String toString()
Specified by:
toString in class Tag


Copyright © 2000-2007 FreeHEP. All Rights Reserved.