Examples of readInt()


Examples of io.airlift.slice.SliceInput.readInt()

    @Override
    public void deserialize(Block block, int index, MaxByState state)
    {
        SliceInput input = block.getSlice(index, 0, block.getLength(0)).getInput();
        int keyLength = input.readInt();
        int valueLength = input.readInt();
        state.setKey(null);
        state.setValue(null);
        if (keyLength > 0) {
            state.setKey(toBlock(state.getKeyType(), input, keyLength));
View Full Code Here

Examples of io.netty.buffer.ByteBuf.readInt()

        if (in.readableBytes() < 4) {
            return null;
        }

        in.markReaderIndex();
        int totalLength = in.readInt();

        if (totalLength > MAX_MESSAGE_SIZE_BYTES) {
            throw new IOException("message too large: " + totalLength + " bytes");
        }
View Full Code Here

Examples of java.io.BufferedInputStream.readInt()

                if(!status.equals("OK")) {
                    progress.fail("Unable to upload files to server: "+status);
                    return;
                }
                progress.updateStatus("File upload complete (Server: "+status+")");
                int count = in.readInt();
                if(count != valid.size()) {
                    progress.fail("Server did not receive all "+valid.size()+" files ("+count+")");
                }
                for (Iterator it = valid.iterator(); it.hasNext();) {
                    Integer index = (Integer) it.next();
View Full Code Here

Examples of java.io.DataInputStream.readInt()

                    byte[] bSource = re.nextRecord();
                    re.destroy();
                    if (bSource != null) {
                        ByteArrayInputStream bais = new ByteArrayInputStream(bSource);
                        DataInputStream dis = new DataInputStream(bais);
                        int nSource = dis.readInt();
                        int nCapture = dis.readInt();
                        this.nCurrentHeight = dis.readInt();
                        this.nCurrentWidth = dis.readInt();
                        dis = null;
                        bais = null;
View Full Code Here

Examples of java.io.ObjectInput.readInt()

                    String uri = readString(input);
                    handler.evNamespace(prefix, uri);
                    break;
                }
                case XQEventEncoder.EV_TEXT: {
                    final int length = input.readInt();
                    final char[] ch = new char[length];
                    for(int i = 0; i < length; i++) {
                        ch[i] = input.readChar();
                    }
                    handler.evText(ch, 0, length);
View Full Code Here

Examples of java.io.ObjectInputStream.readInt()

    try {
      File programConfigFile = new File(Settings.getUserSettingsDirName(),"programConfigurations.dat");
     
      in = new ObjectInputStream(new BufferedInputStream(new FileInputStream(programConfigFile), 0x1000));
     
      in.readInt(); // read version
     
      mAvailableProgramConfigurations = new GlobalPluginProgramFormating[in.readInt()];
     
      for(int i = 0; i < mAvailableProgramConfigurations.length; i++) {
        mAvailableProgramConfigurations[i] = GlobalPluginProgramFormating.load(in);
View Full Code Here

Examples of java.io.RandomAccessFile.readInt()

                    int[][] index = pis.getIndex();
                    is.close();
                   
                    RandomAccessFile raf = new RandomAccessFile(shape + ".shp", "rw");
                    raf.seek(24);
                    int contentLength = raf.readInt();
                   
                    int indexedContentLength = index[0][index[0].length - 1] + index[1][index[1].length - 1];
                   
                    if (contentLength != indexedContentLength) {
                        System.out.println(shape + " content length - shp: " + contentLength + ", shx: " + indexedContentLength);
View Full Code Here

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

        i.seek(0);
        h.check(Double.compare(i.readDouble(), 1.709290273164385E243) == 0);
        i.seek(0);
        h.check(Float.compare(i.readFloat(), 4.7541126E30f) == 0);
        i.seek(0);
        h.check(i.readInt() == 1919944055);
        i.seek(0);
        h.check(i.readLong() == 8246096929276181351L);
        i.seek(0);
        h.check(i.readShort() == 29296);
        i.seek(0);
View Full Code Here

Examples of javax.imageio.stream.ImageInputStreamImplTest.BasicImageInputStreamImpl.readInt()

  public void testWriteInt() throws IOException {
    final BasicImageOutputStreamImpl out = new BasicImageOutputStreamImpl(4);
    final ImageInputStream in = new BasicImageInputStreamImpl(out.buff);

    out.writeInt(Integer.MAX_VALUE);
    assertEquals(Integer.MAX_VALUE, in.readInt());

    out.reset();
    in.reset();
    out.setByteOrder(ByteOrder.LITTLE_ENDIAN);
    in.setByteOrder(ByteOrder.LITTLE_ENDIAN);
View Full Code Here

Examples of javax.imageio.stream.MemoryCacheImageInputStream.readInt()

        i.seek(0);
        h.check(Double.compare(i.readDouble(), 1.709290273164385E243) == 0);
        i.seek(0);
        h.check(Float.compare(i.readFloat(), 4.7541126E30f) == 0);
        i.seek(0);
        h.check(i.readInt() == 1919944055);
        i.seek(0);
        h.check(i.readLong() == 8246096929276181351L);
        i.seek(0);
        h.check(i.readShort() == 29296);
        i.seek(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.