Package javax.imageio.stream

Examples of javax.imageio.stream.ImageInputStream.readBits()


        ImageInputStream mciis = new MemoryCacheImageInputStream(cosStream.getUnfilteredStream());
        while (true)
        {
            try
            {
                byte flag = (byte) (mciis.readBits(bitsPerFlag) & 3);
                LOG.debug("flag: " + flag);
                switch (flag)
                {
                    case 0:
                        Vertex v1 = readVertex(mciis, flag, maxSrcCoord, maxSrcColor, rangeX, rangeY, colRangeTab);
View Full Code Here


                LOG.debug("flag: " + flag);
                switch (flag)
                {
                    case 0:
                        Vertex v1 = readVertex(mciis, flag, maxSrcCoord, maxSrcColor, rangeX, rangeY, colRangeTab);
                        Vertex v2 = readVertex(mciis, (byte) mciis.readBits(bitsPerFlag), maxSrcCoord, maxSrcColor,
                                rangeX, rangeY, colRangeTab);
                        Vertex v3 = readVertex(mciis, (byte) mciis.readBits(bitsPerFlag), maxSrcCoord, maxSrcColor,
                                rangeX, rangeY, colRangeTab);

                        // add them after they're read, so that they are never added if there is a premature EOF
View Full Code Here

                {
                    case 0:
                        Vertex v1 = readVertex(mciis, flag, maxSrcCoord, maxSrcColor, rangeX, rangeY, colRangeTab);
                        Vertex v2 = readVertex(mciis, (byte) mciis.readBits(bitsPerFlag), maxSrcCoord, maxSrcColor,
                                rangeX, rangeY, colRangeTab);
                        Vertex v3 = readVertex(mciis, (byte) mciis.readBits(bitsPerFlag), maxSrcCoord, maxSrcColor,
                                rangeX, rangeY, colRangeTab);

                        // add them after they're read, so that they are never added if there is a premature EOF
                        vertexList.add(v1);
                        vertexList.add(v2);
View Full Code Here

                    case  9: assertEquals("readFloat()",         r.readFloat(),         t.readFloat()0f);    break;
                    case 10: assertEquals("readDouble()",        r.readDouble(),        t.readDouble(), 0d);    break;
                    case 11: assertEquals("readBit()",           r.readBit(),           t.readBit());           break;
                    case 12: {
                        final int n = random.nextInt(Long.SIZE + 1);
                        assertEquals("readBits(" + n + ')', r.readBits(n), t.readBits(n));
                        break;
                    }
                    case 13: {
                        final int length = random.nextInt(ARRAY_MAX_SIZE);
                        final byte[] actual = new byte[length];
View Full Code Here

                    case  9: assertEquals("readFloat()",         r.readFloat(),         t.readFloat()0f);    break;
                    case 10: assertEquals("readDouble()",        r.readDouble(),        t.readDouble(), 0d);    break;
                    case 11: assertEquals("readBit()",           r.readBit(),           t.readBit());           break;
                    case 12: {
                        final int n = random.nextInt(Long.SIZE + 1);
                        assertEquals("readBits(" + n + ')', r.readBits(n), t.readBits(n));
                        break;
                    }
                    case 13: {
                        final int length = random.nextInt(ARRAY_MAX_SIZE);
                        final byte[] actual = new byte[length];
View Full Code Here

        for(int j = 0; j < h; j++, y++) {
            iis.seek(iisPosition);
            int x = raster.getMinX();
            for(int i = 0; i < w; i++, x++) {
                for(int b = 0; b < numBands; b++) {
                    long bits = iis.readBits(sampleSize[b]);
                    raster.setSample(x, y, b, (int)bits);
                }
            }
            iisPosition += stride;
        }
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.