KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > imagero > uio > RandomAccess


1 /*
2  * Copyright (c) Andrey Kuznetsov. All Rights Reserved.
3  *
4  * http://uio.imagero.com
5  *
6  * Redistribution and use in source and binary forms, with or without
7  * modification, are permitted provided that the following conditions are met:
8  *
9  * o Redistributions of source code must retain the above copyright notice,
10  * this list of conditions and the following disclaimer.
11  *
12  * o Redistributions in binary form must reproduce the above copyright notice,
13  * this list of conditions and the following disclaimer in the documentation
14  * and/or other materials provided with the distribution.
15  *
16  * o Neither the name of imagero Andrei Kouznetsov nor the names of
17  * its contributors may be used to endorse or promote products derived
18  * from this software without specific prior written permission.
19  *
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
29  * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31  */

32 package com.imagero.uio;
33
34 import java.io.DataOutput JavaDoc;
35 import java.io.IOException JavaDoc;
36
37 /**
38  * interface for read/write access to data
39  * Allows unified read/write access to data - arrays, files, streams and many other.
40  *
41  * @author Andrei Kouznetsov
42  * Date: 08.11.2003
43  * Time: 12:59:40
44  */

45 public interface RandomAccess extends RandomAccessRO, DataOutput JavaDoc {
46     /**
47      * Set length of data.
48      *
49      * @param newLength new length of data
50      *
51      * @throws IOException
52      */

53     void setLength(long newLength) throws IOException JavaDoc;
54
55     /**
56      * Writes short array to the output
57      *
58      * @param data short array
59      *
60      * @throws IOException
61      */

62     void write(short[] data) throws IOException JavaDoc;
63
64     /**
65      * Writes short array to the output
66      *
67      * @param data short array
68      * @param byteOrder byte order in which short array read into temporary buffer
69      *
70      * @throws IOException
71      */

72     void write(short[] data, int byteOrder) throws IOException JavaDoc;
73
74     /**
75      * Writes short array to the output
76      *
77      * @param data short array
78      * @param offset start offset in array
79      * @param length length number of shorts to write
80      *
81      * @throws IOException
82      */

83     void write(short[] data, int offset, int length) throws IOException JavaDoc;
84
85     /**
86      * Writes short array to the output
87      *
88      * @param data short array
89      * @param offset start offset in array
90      * @param length length number of shorts to write
91      * @param byteOrder byte order in which short array read into temporary buffer
92      *
93      * @throws IOException
94      */

95     void write(short[] data, int offset, int length, int byteOrder) throws IOException JavaDoc;
96
97     /**
98      * Writes char array to the output
99      *
100      * @param data char array
101      *
102      * @throws IOException
103      */

104     void write(char[] data) throws IOException JavaDoc;
105
106     /**
107      * Writes char array to the output
108      *
109      * @param data char array
110      * @param byteOrder byte order in which char array read into temporary buffer
111      *
112      * @throws IOException
113      */

114     void write(char[] data, int byteOrder) throws IOException JavaDoc;
115
116     /**
117      * Writes char array to the output
118      *
119      * @param data char array
120      * @param offset start offset in array
121      * @param length length number of shorts to write
122      *
123      * @throws IOException
124      */

125     void write(char[] data, int offset, int length) throws IOException JavaDoc;
126
127     /**
128      * Writes char array to the output
129      *
130      * @param data char array
131      * @param offset start offset in array
132      * @param length length number of shorts to write
133      * @param byteOrder byte order in which char array read into temporary buffer
134      *
135      * @throws IOException
136      */

137     void write(char[] data, int offset, int length, int byteOrder) throws IOException JavaDoc;
138
139     /**
140      * Writes int array to the output
141      *
142      * @param data int array
143      *
144      * @throws IOException
145      */

146     void write(int[] data) throws IOException JavaDoc;
147
148     /**
149      * Writes int array to the output
150      *
151      * @param data int array
152      * @param byteOrder byte order in which int array read into temporary buffer
153      *
154      * @throws IOException
155      */

156     void write(int[] data, int byteOrder) throws IOException JavaDoc;
157
158     /**
159      * Writes int array to the output
160      *
161      * @param data int array
162      * @param offset start offset in array
163      * @param length length number of ints to write
164      *
165      * @throws IOException
166      */

167     void write(int[] data, int offset, int length) throws IOException JavaDoc;
168
169     /**
170      * Writes int array to the output
171      *
172      * @param data int array
173      * @param offset start offset in array
174      * @param length length number of ints to write
175      * @param byteOrder byte order in which int array read into temporary buffer
176      *
177      * @throws IOException
178      */

179     void write(int[] data, int offset, int length, int byteOrder) throws IOException JavaDoc;
180
181     /**
182      * Writes float array to the output
183      *
184      * @param data float array
185      *
186      * @throws IOException
187      */

188     void write(float[] data) throws IOException JavaDoc;
189
190     /**
191      * Writes float array to the output
192      *
193      * @param data float array
194      * @param byteOrder byte order in which float array read into temporary buffer
195      *
196      * @throws IOException
197      */

198     void write(float[] data, int byteOrder) throws IOException JavaDoc;
199
200     /**
201      * Writes int array to the output
202      *
203      * @param data int array
204      * @param offset start offset in array
205      * @param length length number of ints to write
206      *
207      * @throws IOException
208      */

209     void write(float[] data, int offset, int length) throws IOException JavaDoc;
210
211     /**
212      * Writes float array to the output
213      *
214      * @param data float array
215      * @param offset start offset in array
216      * @param length length number of float to write
217      * @param byteOrder byte order in which float array read into temporary buffer
218      *
219      * @throws IOException
220      */

221     void write(float[] data, int offset, int length, int byteOrder) throws IOException JavaDoc;
222
223     /**
224      * Writes long array to the output
225      *
226      * @param data long array
227      *
228      * @throws IOException
229      */

230     void write(long[] data) throws IOException JavaDoc;
231
232     /**
233      * Writes long array to the output
234      *
235      * @param data long array
236      * @param byteOrder byte order in which long array read into temporary buffer
237      *
238      * @throws IOException
239      */

240     void write(long[] data, int byteOrder) throws IOException JavaDoc;
241
242     /**
243      * Writes long array to the output
244      *
245      * @param data long array
246      * @param offset start offset in array
247      * @param length length number of longs to write
248      *
249      * @throws IOException
250      */

251     void write(long[] data, int offset, int length) throws IOException JavaDoc;
252
253     /**
254      * Writes long array to the output
255      *
256      * @param data long array
257      * @param offset start offset in array
258      * @param length length number of longs to write
259      * @param byteOrder byte order in which long array read into temporary buffer
260      *
261      * @throws IOException
262      */

263     void write(long[] data, int offset, int length, int byteOrder) throws IOException JavaDoc;
264
265     /**
266      * Writes double array to the output
267      *
268      * @param data double array
269      *
270      * @throws IOException
271      */

272     void write(double[] data) throws IOException JavaDoc;
273
274     /**
275      * Writes double array to the output
276      *
277      * @param data double array
278      * @param byteOrder byte order in which double array read into temporary buffer
279      *
280      * @throws IOException
281      */

282     void write(double[] data, int byteOrder) throws IOException JavaDoc;
283
284     /**
285      * Writes double array to the output
286      *
287      * @param data double array
288      * @param offset start offset in array
289      * @param length number of doubles to write
290      *
291      * @throws IOException
292      */

293     void write(double[] data, int offset, int length) throws IOException JavaDoc;
294
295     /**
296      * Writes double array to the output
297      *
298      * @param data double array
299      * @param offset start offset in array
300      * @param length number of doubles to write
301      * @param byteOrder byte order in which long array read into temporary buffer
302      *
303      * @throws IOException
304      */

305     void write(double[] data, int offset, int length, int byteOrder) throws IOException JavaDoc;
306
307 }
308
Popular Tags