001    /*
002     * Copyright (c) Andrey Kuznetsov. All Rights Reserved.
003     *
004     * http://uio.imagero.com
005     *
006     * Redistribution and use in source and binary forms, with or without
007     * modification, are permitted provided that the following conditions are met:
008     *
009     *  o Redistributions of source code must retain the above copyright notice,
010     *    this list of conditions and the following disclaimer.
011     *
012     *  o Redistributions in binary form must reproduce the above copyright notice,
013     *    this list of conditions and the following disclaimer in the documentation
014     *    and/or other materials provided with the distribution.
015     *
016     *  o Neither the name of Andrey Kuznetsov nor the names of
017     *    its contributors may be used to endorse or promote products derived
018     *    from this software without specific prior written permission.
019     *
020     * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
021     * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
022     * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
023     * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
024     * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
025     * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
026     * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
027     * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
028     * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
029     * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
030     * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
031     */
032    package com.imagero.uio;
033    
034    import java.io.DataInput;
035    import java.io.IOException;
036    
037    /**
038     * AdvancedDataInput extends DataInput with possibility to read data to primitive arrays
039     * @author Andrey Kuznetsov
040     */
041    public interface AdvancedDataInput extends DataInput {
042        void readFully(short[] dest) throws IOException;
043    
044        void readFully(short[] dest, int byteOrder) throws IOException;
045    
046        void readFully(short[] dest, int offset, int length) throws IOException;
047    
048        void readFully(short[] dest, int offset, int length, int byteOrder) throws IOException;
049    
050        void readFully(char[] dest) throws IOException;
051    
052        void readFully(char[] dest, int byteOrder) throws IOException;
053    
054        void readFully(char[] dest, int offset, int length) throws IOException;
055    
056        void readFully(char[] dest, int offset, int length, int byteOrder) throws IOException;
057    
058        void readFully(int[] dest) throws IOException;
059    
060        void readFully(int[] dest, int byteOrder) throws IOException;
061    
062        void readFully(int[] dest, int offset, int length) throws IOException;
063    
064        void readFully(int[] dest, int offset, int length, int byteOrder) throws IOException;
065    
066        void readFully(long[] dest) throws IOException;
067    
068        void readFully(long[] dest, int byteOrder) throws IOException;
069    
070        void readFully(long[] dest, int offset, int length) throws IOException;
071    
072        void readFully(long[] dest, int offset, int length, int byteOrder) throws IOException;
073    
074        void readFully(float[] dest) throws IOException;
075    
076        void readFully(float[] dest, int byteOrder) throws IOException;
077    
078        void readFully(float[] dest, int offset, int length) throws IOException;
079    
080        void readFully(float[] dest, int offset, int length, int byteOrder) throws IOException;
081    
082        void readFully(double[] dest) throws IOException;
083    
084        void readFully(double[] dest, int byteOrder) throws IOException;
085    
086        void readFully(double[] dest, int offset, int length) throws IOException;
087    
088        void readFully(double[] dest, int offset, int length, int byteOrder) throws IOException;
089    
090        int read(short[] dest) throws IOException;
091    
092        int read(short[] dest, int byteOrder) throws IOException;
093    
094        int read(short[] dest, int offset, int length) throws IOException;
095    
096        int read(short[] dest, int offset, int length, int byteOrder) throws IOException;
097    
098        int read(char[] dest) throws IOException;
099    
100        int read(char[] dest, int byteOrder) throws IOException;
101    
102        int read(char[] dest, int offset, int length) throws IOException;
103    
104        int read(char[] dest, int offset, int length, int byteOrder) throws IOException;
105    
106        int read(int[] dest) throws IOException;
107    
108        int read(int[] dest, int byteOrder) throws IOException;
109    
110        int read(int[] dest, int offset, int length) throws IOException;
111    
112        int read(int[] dest, int offset, int length, int byteOrder) throws IOException;
113    
114        int read(long[] dest) throws IOException;
115    
116        int read(long[] dest, int byteOrder) throws IOException;
117    
118        int read(long[] dest, int offset, int length) throws IOException;
119    
120        int read(long[] dest, int offset, int length, int byteOrder) throws IOException;
121    
122        int read(float[] dest) throws IOException;
123    
124        int read(float[] dest, int byteOrder) throws IOException;
125    
126        int read(float[] dest, int offset, int length) throws IOException;
127    
128        int read(float[] dest, int offset, int length, int byteOrder) throws IOException;
129    
130        int read(double[] dest) throws IOException;
131    
132        int read(double[] dest, int byteOrder) throws IOException;
133    
134        int read(double[] dest, int offset, int length) throws IOException;
135    
136        int read(double[] dest, int offset, int length, int byteOrder) throws IOException;
137    
138        byte [] readByteLine() throws IOException;
139    
140        int readByteLine(byte [] dest) throws IOException;
141    
142        short readShort(int byteOrder) throws IOException;
143    
144        int readUnsignedShort(int byteOrder) throws IOException;
145    
146        char readChar(int byteOrder) throws IOException;
147    
148        int readInt(int byteOrder) throws IOException;
149    
150        long readLong(int byteOrder) throws IOException;
151    
152        float readFloat(int byteOrder) throws IOException;
153    
154        double readDouble(int byteOrder) throws IOException;
155    
156    }