001: package org.garret.perst;
002:
003: import java.util.Date;
004:
005: /**
006: * Interface for storing component of the objects.
007: * Programmer should use methods of this interface while
008: * implementation of </code>ISerializable.writeObject(IOutputStream)</code> method
009: */
010: public interface IOutputStream {
011: /**
012: * Write boolean value
013: * @param v value of the field
014: */
015: void writeBoolean(boolean v);
016:
017: /**
018: * Write byte value
019: * @param v value of the field
020: */
021: void writeByte(byte v);
022:
023: /**
024: * Write char value
025: * @param v value of the field
026: */
027: void writeChar(char v);
028:
029: /**
030: * Write short value
031: * @param v value of the field
032: */
033: void writeShort(short v);
034:
035: /**
036: * Write int value
037: * @param v value of the field
038: */
039: void writeInt(int v);
040:
041: /**
042: * Write long value
043: * @param v value of the field
044: */
045: void writeLong(long v);
046:
047: /**
048: * Write float value
049: * @param v value of the field
050: */
051: void writeFloat(float v);
052:
053: /**
054: * Write double value
055: * @param v value of the field
056: */
057: void writeDouble(double v);
058:
059: /**
060: * Write String value
061: * @param v value of the field (may be null)
062: */
063: void writeString(String v);
064:
065: /**
066: * Write date value
067: * @param v value of the field (may be null)
068: */
069: void writeDate(Date v);
070:
071: /**
072: * Write persistent object reference
073: * @param v value of the field (may be null)
074: */
075: void writeObject(IPersistent v);
076:
077: /**
078: * Write persistent object link
079: * @param v value of the field (may be null)
080: */
081: void writeLink(Link v);
082:
083: /**
084: * Write array of boolean value
085: * @param v value of the field (may be null)
086: */
087: void writeArrayOfBoolean(boolean[] v);
088:
089: /**
090: * Write array of byte value
091: * @param v value of the field (may be null)
092: */
093: void writeArrayOfByte(byte[] v);
094:
095: /**
096: * Write array of char value
097: * @param v value of the field (may be null)
098: */
099: void writeArrayOfChar(char[] v);
100:
101: /**
102: * Write array of short value
103: * @param v value of the field (may be null)
104: */
105: void writeArrayOfShort(short[] v);
106:
107: /**
108: * Write array of int value
109: * @param v value of the field (may be null)
110: */
111: void writeArrayOfInt(int[] v);
112:
113: /**
114: * Write array of long value
115: * @param v value of the field (may be null)
116: */
117: void writeArrayOfLong(long[] v);
118:
119: /**
120: * Write array of float value
121: * @param v value of the field (may be null)
122: */
123: void writeArrayOfFloat(float[] v);
124:
125: /**
126: * Write array of double value
127: * @param v value of the field (may be null)
128: */
129: void writeArrayOfDouble(double[] v);
130:
131: /**
132: * Write array of string value
133: * @param v value of the field (may be null)
134: */
135: void writeArrayOfString(String[] v);
136:
137: /**
138: * Write array of date value
139: * @param v value of the field (may be null)
140: */
141: void writeArrayOfDate(Date[] v);
142:
143: /**
144: * Write array of object value. Restrictions of array elements type are the same as for
145: * <code>writeObject()</code> method.
146: * @param v value of the field (may be null)
147: */
148: void writeArrayOfObject(IPersistent[] v);
149: }
|