org.freehep.util.io
Class Action
- java.lang.Object
-
- org.freehep.util.io.Action
-
- Direct Known Subclasses:
- Action.Unknown
public abstract class Action extends java.lang.ObjectGeneric Action, to be used with the TagIn/OutputStreams. An action can have an ActionCode, a length as well as parameters.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static classAction.UnknownUsed for not recognized actions.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method and Description intgetCode()java.lang.StringgetName()abstract Actionread(int actionCode, TaggedInputStream input, int length)Read an action from the input, with given actioncode and lengthjava.lang.StringtoString()abstract voidwrite(int actionCode, TaggedOutputStream output)Write an action to output
-
-
-
Method Detail
-
read
public abstract Action read(int actionCode, TaggedInputStream input, int length) throws java.io.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:
java.io.IOException- if read fails
-
write
public abstract void write(int actionCode, TaggedOutputStream output) throws java.io.IOExceptionWrite an action to output- Parameters:
actionCode- actionCode to use for this actionoutput- output to write to- Throws:
java.io.IOException- if write fails
-
getCode
public int getCode()
- Returns:
- actionCode
-
getName
public java.lang.String getName()
- Returns:
- name of the action
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-
DMelt 3.0 © DataMelt by jWork.ORG