sventon subversion web client - http://www.sventon.org
[show recent changes]
 
  Help
HEAD
Rev: 7022 - svn://svn.freehep.org/svn / freehep / cvs / xdr / trunk / XDRDataInput.java
Unified Diff View - XDRDataInput.java
Search for Help
/freehep/cvs/xdr/trunk/XDRDataInput.java @ revision 7021
/freehep/cvs/xdr/trunk/XDRDataInput.java @ revision 7022
@@ -1,5 +1,9 @@ package hep.io.xdr; -import java.io.*; + +import java.io.DataInput; +import java.io.IOException; + + /**  * An interface implemented by input streams that support XDR.  * @@ -7,48 +11,52 @@  * format, except that items are padded to 4 byte boundaries, and  * strings are normally stored in ASCII format.  * @author Tony Johnson (tonyj@slac.stanford.edu) - * @version $Id: XDRDataInput.java 6986 2000-10-25 19:55:49Z tonyj $ + * @version $Id: XDRDataInput.java 7022 2003-09-16 23:11:55Z tonyj $  */ - public interface XDRDataInput extends DataInput { - /** -  * Read a String. Assumes int length proceeds String. -  * Throws an exception if string length > 32767 to protect -  * against bad data exhausting memory. -  */ - String readString() throws IOException; - /** -  * Reads a String of length l bytes, and skips appropriate -  * amount to bring stream to 4-byte boundary. -  */ - String readString(int l) throws IOException; - /** -  * Reads an integer array. Assumes int length proceeds array. -  * Throws an exception if array length > 32767 to protect -  * against bad data exhausting memory. If buffer is not null, -  * and is large enough to hold array, it is filled and returned, -  * otherwise a new array is allocated and returned. -  */ - int[] readIntArray(int[] buffer) throws IOException; - /** -  * Reads a double array. Assumes int length proceeds array. -  * Throws an exception if array length > 32767 to protect -  * against bad data exhausting memory. If buffer is not null, -  * and is large enough to hold array, it is filled and returned, -  * otherwise a new array is allocated and returned. -  */ - double[] readDoubleArray(double[] buffer) throws IOException; - /** -  * Reads a float array. Assumes int length proceeds array. -  * Throws an exception if array length > 32767 to protect -  * against bad data exhausting memory. If buffer is not null, -  * and is large enough to hold array, it is filled and returned, -  * otherwise a new array is allocated and returned. -  */ - float[] readFloatArray(float[] buffer) throws IOException; - /** -  * Skips appropriate amount to bring stream to 4-byte boundary. -  */ - void pad() throws IOException; +   /** + * Skips appropriate amount to bring stream to 4-byte boundary. + */ +   void pad() throws IOException; + +   /** + * Reads a double array. Assumes int length proceeds array. + * Throws an exception if array length > 32767 to protect + * against bad data exhausting memory. If buffer is not null, + * and is large enough to hold array, it is filled and returned, + * otherwise a new array is allocated and returned. + */ +   double[] readDoubleArray(double[] buffer) throws IOException; + +   /** + * Reads a float array. Assumes int length proceeds array. + * Throws an exception if array length > 32767 to protect + * against bad data exhausting memory. If buffer is not null, + * and is large enough to hold array, it is filled and returned, + * otherwise a new array is allocated and returned. + */ +   float[] readFloatArray(float[] buffer) throws IOException; + +   /** + * Reads an integer array. Assumes int length proceeds array. + * Throws an exception if array length > 32767 to protect + * against bad data exhausting memory. If buffer is not null, + * and is large enough to hold array, it is filled and returned, + * otherwise a new array is allocated and returned. + */ +   int[] readIntArray(int[] buffer) throws IOException; + +   /** + * Read a String. Assumes int length proceeds String. + * Throws an exception if string length > 32767 to protect + * against bad data exhausting memory. + */ +   String readString() throws IOException; + +   /** + * Reads a String of length l bytes, and skips appropriate + * amount to bring stream to 4-byte boundary. + */ +   String readString(int l) throws IOException; }


feed icon

sventon 2.5.1