org.freehep.util.io
Class Action
java.lang.Object
   org.freehep.util.io.Action
org.freehep.util.io.Action
- Direct Known Subclasses: 
- Action.Unknown
- public abstract class Action 
- extends Object
Generic Action, to be used with the TagIn/OutputStreams. An action can have
 an ActionCode, a length as well as parameters.
- Version:
- $Id: Action.java 8584 2006-08-10 23:06:37Z duns $
- Author:
- Mark Donszelmann, Charles Loomis
| Nested Class Summary | 
| static class | Action.UnknownUsed for not recognized actions.
 | 
 
| Constructor Summary | 
| protected  | Action(int code)
 | 
 
 
 
Action
protected Action(int code)
read
public abstract Action read(int actionCode,
                            TaggedInputStream input,
                            int length)
                     throws IOException
- Read an action from the input, with given actioncode and length
 
- 
- Parameters:
- actionCode- decoded actionCode
- input- input to read from
- length- length to read
- Returns:
- action corresponding to actionCode
- Throws:
- IOException- if read fails
 
write
public abstract void write(int actionCode,
                           TaggedOutputStream output)
                    throws IOException
- Write an action to output
 
- 
- Parameters:
- actionCode- actionCode to use for this action
- output- output to write to
- Throws:
- IOException- if write fails
 
getCode
public int getCode()
- 
- Returns:
- actionCode
 
getName
public String getName()
- 
- Returns:
- name of the action
 
toString
public String toString()
- 
- Overrides:
- toStringin class- Object
 
- 
 
Copyright © 2000-2007 FreeHEP. All Rights Reserved.