Examples of available()


Examples of net.yura.lobby.util.ByteInputStream.available()

        assertEquals(7, in.available()); assertEquals(1, in.skip(1));
        assertEquals(6, in.available()); assertEquals(1, in.skip(1));
        assertEquals(5, in.available()); assertEquals(1, in.skip(1));
        assertEquals(4, in.available()); assertEquals(1, in.skip(1));
        assertEquals(3, in.available()); assertEquals(1, in.skip(1));
        assertEquals(2, in.available()); assertEquals(1, in.skip(1));
        assertEquals(1, in.available()); assertEquals(1, in.skip(1));
        assertEquals(0, in.available()); assertEquals(0, in.skip(1));

        in.addBytes(new byte[]{43,19});
       
View Full Code Here

Examples of one.nio.serial.DeserializeStream.available()

            throw new IllegalStateException("Invalid metadata size: " + metadataSize);
        }

        int count = 0;
        DeserializeStream ds = new DeserializeStream(mmap.getAddr() + CUSTOM_DATA_OFFSET, (int) metadataSize);
        while (ds.available() > 0) {
            try {
                Repository.provideSerializer((Serializer) ds.readObject());
            } catch (IOException e) {
                throw new IllegalStateException(e);
            } catch (ClassNotFoundException e) {
View Full Code Here

Examples of org.apache.abdera.protocol.server.multipart.MultipartInputStream.available()

            // data = getDataInputStream(multipart);
            // dataHeaders.putAll(headers);
        }

        try {
            while (stream.available() > 0) {
                stream.skipBoundary();
                headers = getHeaders(stream);
                if (start != null
                        && (headers.containsKey(CONTENT_ID_HEADER) && start
                                .equals(headers.get(CONTENT_ID_HEADER)))
View Full Code Here

Examples of org.apache.activemq.util.DataByteArrayInputStream.available()

        formatId = inputStream.readInt();
        int globalLength = inputStream.readShort();
        globalTransactionId = new byte[globalLength];
        try {
            inputStream.read(globalTransactionId);
            branchQualifier = new byte[inputStream.available()];
            inputStream.read(branchQualifier);
        } catch (IOException fatal) {
            throw new RuntimeException(this + ", failed to decode:", fatal);
        }
    }
View Full Code Here

Examples of org.apache.axis2.context.externalize.SafeObjectInputStream.available()

        needsToBeReconciled = true;

        // trace point
        if (DEBUG_ENABLED && log.isTraceEnabled()) {
            log.trace(myClassName + ":readExternal():  BEGIN  bytes available in stream [" +
                    in.available() + "]  ");
        }

        //---------------------------------------------------------
        // object level identifiers
        //---------------------------------------------------------
View Full Code Here

Examples of org.apache.bcel.util.ByteSequence.available()

        byte[] bytes = new byte[end - start];
        System.arraycopy(code, start, bytes, 0, end - start);

        try {
            ByteSequence sequence = new ByteSequence(code);
            while ((sequence.available() > 0) && (sequence.getIndex() < start)) {
                Instruction.readInstruction(sequence);
            }

            int pos;
            while (sequence.available() > 0 && ((pos = sequence.getIndex()) < end)) {
View Full Code Here

Examples of org.apache.cassandra.io.util.MappedFileDataInput.available()

                IColumn c2 = cf2.getColumnSerializer().deserialize(in2);
                assert c1.equals(c2);
            }
            // that should be everything
            assert in1.available() == 0;
            assert in2.available() == 0;
        }
    }

    @Test
    public void testOneRow() throws IOException, ExecutionException, InterruptedException
View Full Code Here

Examples of org.apache.commons.compress.compressors.bzip2.BZip2CompressorInputStream.available()

            final CompressorInputStream in =
                new BZip2CompressorInputStream(is, true);
            try {
                assertEquals('a', in.read());
                assertEquals('b', in.read());
                assertEquals(0, in.available());
                assertEquals(-1, in.read());
            } finally {
                in.close();
            }
        } finally {
View Full Code Here

Examples of org.apache.commons.compress.compressors.gzip.GzipCompressorInputStream.available()

            final CompressorInputStream in =
                new GzipCompressorInputStream(is, true);
            try {
                assertEquals('a', in.read());
                assertEquals('b', in.read());
                assertEquals(0, in.available());
                assertEquals(-1, in.read());
            } finally {
                in.close();
            }
        } finally {
View Full Code Here

Examples of org.apache.commons.compress.compressors.pack200.Pack200CompressorInputStream.available()

            assertEquals(3, rest[1]);
            assertEquals(4, rest[2]);
            assertEquals(1, is.skip(1));
            is.reset();
            assertEquals(0x50, is.read());
            assertTrue(is.available() > 0);
        } finally {
            is.close();
        }
    }
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.