Code example for RandomAccessFile

Methods: readreadBytereadIntseek

0
                    { 
                        return null; 
                    } 
                    else 
                    { 
                        this.dataFile.seek((long)(l * 4096));
                        int j1 = this.dataFile.readInt();
 
                        if (j1 > 4096 * i1)
                        { 
                            return null; 
                        } 
                        else if (j1 <= 0)
                        { 
                            return null; 
                        } 
                        else 
                        { 
                            byte b0 = this.dataFile.readByte();
                            byte[] abyte;
 
                            if (b0 == 1)
                            { 
                                abyte = new byte[j1 - 1];
                                this.dataFile.read(abyte);
                                return new DataInputStream(new BufferedInputStream(new GZIPInputStream(new ByteArrayInputStream(abyte))));
                            } 
                            else if (b0 == 2)
                            { 
                                abyte = new byte[j1 - 1];
                                this.dataFile.read(abyte);
                                return new DataInputStream(new BufferedInputStream(new InflaterInputStream(new ByteArrayInputStream(abyte))));
                            } 
                            else 
                            { 
                                return null; 
Contextual code suggestions in your IDE  Get Codota for Java