53 |
public interface DataOutput |
public interface DataOutput |
54 |
{ |
{ |
55 |
|
|
56 |
/** |
/** |
57 |
* This method writes a Java boolean value to an output stream |
* This method writes a Java boolean value to an output stream |
58 |
* |
* |
59 |
* @param value The boolean value to write |
* @param value The boolean value to write |
60 |
* |
* |
61 |
* @exception IOException If an error occurs |
* @exception IOException If an error occurs |
62 |
*/ |
*/ |
63 |
void |
void writeBoolean(boolean value) throws IOException; |
64 |
writeBoolean(boolean value) throws IOException; |
|
65 |
|
/*************************************************************************/ |
66 |
/*************************************************************************/ |
|
67 |
|
/** |
68 |
/** |
* This method writes a Java byte value to an output stream |
69 |
* This method writes a Java byte value to an output stream |
* |
70 |
* |
* @param value The int value to write |
71 |
* @param value The int value to write |
* |
72 |
* |
* @exception IOException If an error occurs |
73 |
* @exception IOException If an error occurs |
*/ |
74 |
*/ |
void writeByte(int value) throws IOException; |
75 |
void |
|
76 |
writeByte(int value) throws IOException; |
/*************************************************************************/ |
77 |
|
|
78 |
/*************************************************************************/ |
/** |
79 |
|
* This method writes a Java char value to an output stream |
80 |
/** |
* |
81 |
* This method writes a Java char value to an output stream |
* @param value The char value to write |
82 |
* |
* |
83 |
* @param value The char value to write |
* @exception IOException If an error occurs |
84 |
* |
*/ |
85 |
* @exception IOException If an error occurs |
void writeChar(int value) throws IOException; |
86 |
*/ |
|
87 |
void |
/*************************************************************************/ |
88 |
writeChar(int value) throws IOException; |
|
89 |
|
/** |
90 |
/*************************************************************************/ |
* This method writes a Java int value to an output stream as a 16 bit value |
91 |
|
* |
92 |
/** |
* @param value The int value to write as a 16-bit value |
93 |
* This method writes a Java int value to an output stream as a 16 bit value |
* |
94 |
* |
* @exception IOException If an error occurs |
95 |
* @param value The int value to write as a 16-bit value |
*/ |
96 |
* |
void writeShort(int value) throws IOException; |
97 |
* @exception IOException If an error occurs |
|
98 |
*/ |
/*************************************************************************/ |
99 |
void |
|
100 |
writeShort(int value) throws IOException; |
/** |
101 |
|
* This method writes a Java int value to an output stream |
102 |
/*************************************************************************/ |
* |
103 |
|
* @param value The int value to write |
104 |
/** |
* |
105 |
* This method writes a Java int value to an output stream |
* @exception IOException If an error occurs |
106 |
* |
*/ |
107 |
* @param value The int value to write |
void writeInt(int value) throws IOException; |
108 |
* |
|
109 |
* @exception IOException If an error occurs |
/*************************************************************************/ |
110 |
*/ |
|
111 |
void |
/** |
112 |
writeInt(int value) throws IOException; |
* This method writes a Java long value to an output stream |
113 |
|
* |
114 |
/*************************************************************************/ |
* @param value The long value to write |
115 |
|
* |
116 |
/** |
* @exception IOException If an error occurs |
117 |
* This method writes a Java long value to an output stream |
*/ |
118 |
* |
void writeLong(long value) throws IOException; |
119 |
* @param value The long value to write |
|
120 |
* |
/*************************************************************************/ |
121 |
* @exception IOException If an error occurs |
|
122 |
*/ |
/** |
123 |
void |
* This method writes a Java float value to an output stream |
124 |
writeLong(long value) throws IOException; |
* |
125 |
|
* @param value The float value to write |
126 |
/*************************************************************************/ |
* |
127 |
|
* @exception IOException If an error occurs |
128 |
/** |
*/ |
129 |
* This method writes a Java float value to an output stream |
void writeFloat(float value) throws IOException; |
130 |
* |
|
131 |
* @param value The float value to write |
/*************************************************************************/ |
132 |
* |
|
133 |
* @exception IOException If an error occurs |
/** |
134 |
*/ |
* This method writes a Java double value to an output stream |
135 |
void |
* |
136 |
writeFloat(float value) throws IOException; |
* @param value The double value to write |
137 |
|
* |
138 |
/*************************************************************************/ |
* @exception IOException If any other error occurs |
139 |
|
*/ |
140 |
/** |
void writeDouble(double value) throws IOException; |
141 |
* This method writes a Java double value to an output stream |
|
142 |
* |
/*************************************************************************/ |
143 |
* @param value The double value to write |
|
144 |
* |
/** |
145 |
* @exception IOException If any other error occurs |
* This method writes a String to an output stream as an array of bytes |
146 |
*/ |
* |
147 |
void |
* @param value The String to write |
148 |
writeDouble(double value) throws IOException; |
* |
149 |
|
* @exception IOException If an error occurs |
150 |
/*************************************************************************/ |
*/ |
151 |
|
void writeBytes(String value) throws IOException; |
152 |
/** |
|
153 |
* This method writes a String to an output stream as an array of bytes |
/*************************************************************************/ |
154 |
* |
|
155 |
* @param value The String to write |
/** |
156 |
* |
* This method writes a String to an output stream as an array of char's |
157 |
* @exception IOException If an error occurs |
* |
158 |
*/ |
* @param value The String to write |
159 |
void |
* |
160 |
writeBytes(String value) throws IOException; |
* @exception IOException If an error occurs |
161 |
|
*/ |
162 |
/*************************************************************************/ |
void writeChars(String value) throws IOException; |
163 |
|
|
164 |
/** |
/*************************************************************************/ |
165 |
* This method writes a String to an output stream as an array of char's |
|
166 |
* |
/** |
167 |
* @param value The String to write |
* This method writes a String to an output stream encoded in |
168 |
* |
* UTF-8 format. |
169 |
* @exception IOException If an error occurs |
* |
170 |
*/ |
* @param value The String to write |
171 |
void |
* |
172 |
writeChars(String value) throws IOException; |
* @exception IOException If an error occurs |
173 |
|
*/ |
174 |
/*************************************************************************/ |
void writeUTF(String value) throws IOException; |
175 |
|
|
176 |
/** |
/*************************************************************************/ |
177 |
* This method writes a String to an output stream encoded in |
|
178 |
* UTF-8 format. |
/** |
179 |
* |
* This method writes an 8-bit value (passed into the method as a Java |
180 |
* @param value The String to write |
* int) to an output stream. |
181 |
* |
* |
182 |
* @exception IOException If an error occurs |
* @param value The byte to write to the output stream |
183 |
*/ |
* |
184 |
void |
* @exception IOException If an error occurs |
185 |
writeUTF(String value) throws IOException; |
*/ |
186 |
|
void write(int value) throws IOException; |
187 |
/*************************************************************************/ |
|
188 |
|
/*************************************************************************/ |
189 |
/** |
|
190 |
* This method writes an 8-bit value (passed into the method as a Java |
/** |
191 |
* int) to an output stream. |
* This method writes the raw byte array passed in to the output stream. |
192 |
* |
* |
193 |
* @param value The byte to write to the output stream |
* @param buf The byte array to write |
194 |
* |
* |
195 |
* @exception IOException If an error occurs |
* @exception IOException If an error occurs |
196 |
*/ |
*/ |
197 |
void |
void write(byte[] buf) throws IOException; |
198 |
write(int value) throws IOException; |
|
199 |
|
/*************************************************************************/ |
200 |
/*************************************************************************/ |
|
201 |
|
/** |
202 |
/** |
* This method writes raw bytes from the passed array <code>buf</code> |
203 |
* This method writes the raw byte array passed in to the output stream. |
* starting |
204 |
* |
* <code>offset</code> bytes into the buffer. The number of bytes |
205 |
* @param buf The byte array to write |
* written will be * exactly <code>len</code>. |
206 |
* |
* |
207 |
* @exception IOException If an error occurs |
* @param buf The buffer from which to write the data |
208 |
*/ |
* @param offset The offset into the buffer to start writing data from |
209 |
void |
* @param len The number of bytes to write from the buffer to the output |
210 |
write(byte[] buf) throws IOException; |
* stream |
211 |
|
* |
212 |
/*************************************************************************/ |
* @exception IOException If any other error occurs |
213 |
|
*/ |
214 |
/** |
void write(byte[] buf, int offset, int len) throws IOException; |
|
* This method writes raw bytes from the passed array <code>buf</code> starting |
|
|
* <code>offset</code> bytes into the buffer. The number of bytes written will be |
|
|
* exactly <code>len</code>. |
|
|
* |
|
|
* @param buf The buffer from which to write the data |
|
|
* @param offset The offset into the buffer to start writing data from |
|
|
* @param len The number of bytes to write from the buffer to the output stream |
|
|
* |
|
|
* @exception IOException If any other error occurs |
|
|
*/ |
|
|
void |
|
|
write(byte[] buf, int offset, int len) throws IOException; |
|
215 |
|
|
216 |
} // interface DataOutput |
} // interface DataOutput |
217 |
|
|