Debian Codegraph @

src/main/java/org/freehep/util/io/ActionHeader.java

raw
1 // Copyright 2001, FreeHEP.
2 package org.freehep.util.io;
3
4 /**
5 * Keeps the actionCode and Length of a specific action. To be used in the
6 * TaggedInputStream to return the actionCode and Length, and in the
7 * TaggedOutputStream to write them.
8 *
9 * @author Mark Donszelmann
10 * @author Charles Loomis
11 * @version $Id: ActionHeader.java 8584 2006-08-10 23:06:37Z duns $
12 */
13 public class ActionHeader {
14
15 int actionCode;
16
17 long length;
18
19 /**
20 * Creates an action header
21 *
22 * @param actionCode code for action
23 * @param length total length of the tag
24 */
25 public ActionHeader(int actionCode, long length) {
26 this.actionCode = actionCode;
27 this.length = length;
28 }
29
30 /**
31 * Sets the action code
32 *
33 * @param actionCode new action code
34 */
35 public void setAction(int actionCode) {
36 this.actionCode = actionCode;
37 }
38
39 /**
40 * @return action code
41 */
42 public int getAction() {
43 return actionCode;
44 }
45
46 /**
47 * Sets the length of this tag
48 *
49 * @param length new length
50 */
51 public void setLength(long length) {
52 this.length = length;
53 }
54
55 /**
56 * @return length of this tag
57 */
58 public long getLength() {
59 return length;
60 }
61 }