Package org.gradle.internal.io

Examples of org.gradle.internal.io.RandomAccessFileInputStream


                throw blockCorruptedException();
            }
            file.seek(pos);

            Crc32InputStream checkSumInputStream = new Crc32InputStream(new BufferedInputStream(
                    new RandomAccessFileInputStream(file)));
            DataInputStream inputStream = new DataInputStream(checkSumInputStream);

            BlockPayload payload = getPayload();

            // Read header
View Full Code Here


        if (lockFileAccess.length() <= infoRegionPos) {
            return new LockInfo();
        } else {
            lockFileAccess.seek(infoRegionPos);

            DataInputStream inputStream = new DataInputStream(new BufferedInputStream(new RandomAccessFileInputStream(lockFileAccess)));
            byte protocolVersion = inputStream.readByte();
            if (protocolVersion != lockInfoSerializer.getVersion()) {
                throw new IllegalStateException(String.format("Unexpected lock protocol found in lock file. Expected %s, found %s.", lockInfoSerializer.getVersion(), protocolVersion));
            }
View Full Code Here

            boolean ignoreTestLevel = !allClassOutput && testId == 0;

            try {
                dataFile.seek(region.start);
                long maxPos = region.stop - region.start;
                KryoBackedDecoder decoder = new KryoBackedDecoder(new RandomAccessFileInputStream(dataFile));
                while (decoder.getReadPosition() <= maxPos) {
                    boolean readStdout = decoder.readBoolean();
                    long readClassId = decoder.readSmallLong();
                    long readTestId = decoder.readSmallLong();
                    int readLength = decoder.readSmallInt();
View Full Code Here

        public <T> T read(BinaryStore.ReadAction<T> readAction) {
            try {
                if (decoder == null) {
                    RandomAccessFile randomAccess = new RandomAccessFile(inputFile, "r");
                    randomAccess.seek(offset);
                    decoder = new KryoBackedDecoder(new RandomAccessFileInputStream(randomAccess));
                    resources = new CompositeStoppable().add(randomAccess, decoder);
                }
                return readAction.read(decoder);
            } catch (Exception e) {
                throw new RuntimeException("Problems reading data from " + sourceDescription, e);
View Full Code Here

TOP

Related Classes of org.gradle.internal.io.RandomAccessFileInputStream

Copyright © 2018 www.massapicom. 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.