org.freehep.util.io
Class Action
java.lang.Object
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: src/main/java/org/freehep/util/io/Action.java 96b41b903496
2005/11/21 19:50:18 duns $
- Author:
- Mark Donszelmann, Charles Loomis
|
Nested Class Summary |
static class |
Action.Unknown
Used 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 actionCodeinput - input to read fromlength - 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 actionoutput - 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:
toString in class Object
Copyright © 2012. All Rights Reserved.