Package java.io

Examples of java.io.RandomAccessFile.skipBytes()


                            0, 8,
                            // method
                            8, 0,
                        }, header);
                    // ignore timestamp
                    a.skipBytes(4);
                    crc = new byte[4];
                    a.readFully(crc);
                    assertArrayEquals(new byte[] {
                            (byte) 0x9E, (byte) 0xCB,
                            (byte) 0x79, (byte) 0x12,
View Full Code Here


                    assertArrayEquals(new byte[] {
                            (byte) 0x9E, (byte) 0xCB,
                            (byte) 0x79, (byte) 0x12,
                        }, crc);
                    // skip compressed size
                    a.skipBytes(4);
                    rest = new byte[9];
                    a.readFully(rest);

                    boolean hasExtra =
                        mode == Zip64Mode.AsNeeded && !knownSize;
View Full Code Here

                            0, 8,
                            // method
                            8, 0,
                        }, header);
                    // ignore timestamp
                    a.skipBytes(4);
                    byte[] crc = new byte[4];
                    a.readFully(crc);
                    assertArrayEquals(new byte[] {
                            (byte) 0x9E, (byte) 0xCB, (byte) 0x79, (byte) 0x12,
                        }, crc);
View Full Code Here

                    a.readFully(crc);
                    assertArrayEquals(new byte[] {
                            (byte) 0x9E, (byte) 0xCB, (byte) 0x79, (byte) 0x12,
                        }, crc);
                    // skip compressed size
                    a.skipBytes(4);
                    byte[] rest = new byte[23];
                    a.readFully(rest);
                    assertArrayEquals(new byte[] {
                            // Original Size
                            (byte) 0x40, (byte) 0x42, (byte) 0x0F, 0,
View Full Code Here

                            0, 8,
                            // method
                            8, 0,
                        }, header);
                    // ignore timestamp
                    a.skipBytes(4);
                    crc = new byte[4];
                    a.readFully(crc);
                    assertArrayEquals(new byte[] {
                            (byte) 0x9E, (byte) 0xCB,
                            (byte) 0x79, (byte) 0x12,
View Full Code Here

                RandomAccessFile a = new RandomAccessFile(f, "r");
                try {
                    final long end = getLengthAndPositionAtCentralDirectory(a);
                    // skip first two entries
                    a.skipBytes(2 * 47 /* CD entry of file with
                                          file name length 1 and no
                                          extra data */
                                + 2 * (mode == Zip64Mode.Always ? 4 : 0)
                                /* empty ZIP64 extra fields if mode is Always */
                                );
View Full Code Here

                            0, 8,
                            // method
                            0, 0
                        }, header);
                    // ignore timestamp, CRC, compressed size
                    a.skipBytes(12);
                    byte[] rest = new byte[23];
                    a.readFully(rest);
                    assertArrayEquals(new byte[] {
                            // Original Size
                            1, 0, 0, 0,
View Full Code Here

                            0, 8,
                            // method
                            0, 0
                        }, header);
                    // ignore timestamp
                    a.skipBytes(4);
                    byte[] rest = new byte[31];
                    a.readFully(rest);
                    assertArrayEquals(new byte[] {
                            // CRC
                            (byte) 0x50, (byte) 0x6F, (byte) 0x31, (byte) 0x5c,
View Full Code Here

                            0, 8,
                            // method
                            8, 0,
                        }, header);
                    // ignore timestamp
                    a.skipBytes(4);
                    byte[] crc = new byte[4];
                    a.readFully(crc);
                    assertArrayEquals(new byte[] {
                            (byte) 0x9E, (byte) 0xCB, (byte) 0x79, (byte) 0x12,
                        }, crc);
View Full Code Here

                    a.readFully(crc);
                    assertArrayEquals(new byte[] {
                            (byte) 0x9E, (byte) 0xCB, (byte) 0x79, (byte) 0x12,
                        }, crc);
                    // skip compressed size
                    a.skipBytes(4);
                    byte[] rest = new byte[23];
                    a.readFully(rest);
                    assertArrayEquals(new byte[] {
                            // Original Size
                            (byte) 0x40, (byte) 0x42, (byte) 0x0F, 0,
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.