Examples of skipBytes()


Examples of org.jboss.netty.buffer.ChannelBuffer.skipBytes()

                                    break;
                                case READING:
                                    int remaining = buffer.readableBytes();
                                    if (length > remaining) {
                                        length -= remaining;
                                        buffer.skipBytes(remaining);
                                    } else {
                                        buffer.skipBytes(length);
                                        SocketAddress remoteAddress = e.getRemoteAddress();
                                        ctx.getChannel().write(ACK.slice(), remoteAddress);
                                        state = State.WAIT_FOR_FIRST_BYTE_LENGTH;
View Full Code Here

Examples of org.jboss.netty.buffer.ChannelBuffer.skipBytes()

                                    int remaining = buffer.readableBytes();
                                    if (length > remaining) {
                                        length -= remaining;
                                        buffer.skipBytes(remaining);
                                    } else {
                                        buffer.skipBytes(length);
                                        SocketAddress remoteAddress = e.getRemoteAddress();
                                        ctx.getChannel().write(ACK.slice(), remoteAddress);
                                        state = State.WAIT_FOR_FIRST_BYTE_LENGTH;
                                        length = 0;
                                    }
View Full Code Here

Examples of org.jboss.netty.buffer.ChannelBuffer.skipBytes()

                                    break;
                                case READING:
                                    int remaining = buffer.readableBytes();
                                    if (length > remaining) {
                                        length -= remaining;
                                        buffer.skipBytes(remaining);
                                    } else {
                                        buffer.skipBytes(length);
                                        ctx.getChannel().write(ACK.slice());
                                        state = State.WAIT_FOR_FIRST_BYTE_LENGTH;
                                        length = 0;
View Full Code Here

Examples of org.jboss.netty.buffer.ChannelBuffer.skipBytes()

                                    int remaining = buffer.readableBytes();
                                    if (length > remaining) {
                                        length -= remaining;
                                        buffer.skipBytes(remaining);
                                    } else {
                                        buffer.skipBytes(length);
                                        ctx.getChannel().write(ACK.slice());
                                        state = State.WAIT_FOR_FIRST_BYTE_LENGTH;
                                        length = 0;
                                    }
                                }
View Full Code Here

Examples of org.jgroups.util.ByteArrayDataInputStream.skipBytes()

        assert in.position() == 0;
        int skipped=in.skipBytes(6);
        assert skipped == 6;
        assert in.position() == 6;

        skipped=in.skipBytes(0);
        assert skipped == 0;
        assert in.position() == 6;

        skipped=in.skipBytes(-1);
        assert skipped == 0;
View Full Code Here

Examples of ucar.unidata.io.RandomAccessFile.skipBytes()

    PrintStream ps = System.out;
    String infile = args[0];
    raf = new RandomAccessFile(infile, "r");
    raf.order(RandomAccessFile.BIG_ENDIAN);
    // This is the GDS offset
    raf.skipBytes(Integer.parseInt(args[1]));
    // backup to PDS; most of the time it's only 28 bytes
    //raf.skipBytes( -28 ); //TODO: check
    Grib1ProductDefinitionSection pds = new Grib1ProductDefinitionSection(raf);
    Grib1Pds gpv = pds.pdsVars;
    ps.println("Length = " + gpv.getLength());
View Full Code Here

Examples of ucar.unidata.io.RandomAccessFile.skipBytes()

        if (lookForHeader) {
          raf.read(b);
          test = new String(b);
          if (test.equals(Level2VolumeScan.ARCHIVE2) || test.equals(Level2VolumeScan.AR2V0001)) {
            System.out.println("  found header= " + test);
            raf.skipBytes(16);
            lookForHeader = false;
          } else {
            raf.skipBytes(-8);
          }
        }
View Full Code Here

Examples of ucar.unidata.io.RandomAccessFile.skipBytes()

          if (test.equals(Level2VolumeScan.ARCHIVE2) || test.equals(Level2VolumeScan.AR2V0001)) {
            System.out.println("  found header= " + test);
            raf.skipBytes(16);
            lookForHeader = false;
          } else {
            raf.skipBytes(-8);
          }
        }

        try {
          numCompBytes = raf.readInt();
View Full Code Here

Examples of ucar.unidata.io.RandomAccessFile.skipBytes()

          System.out.println("\n--last block " + numCompBytes);
          numCompBytes = -numCompBytes;
          if (!lookForHeader) eof = true;
        }

        raf.skipBytes(numCompBytes);
      }
    } catch (EOFException e) {
      e.printStackTrace();
    }
View Full Code Here

Examples of ucar.unidata.io.RandomAccessFile.skipBytes()

          ga = f.readFloat();
          gb = f.readFloat();

          // skip ahead by gridsize bytes
          f.skipBytes(gridsize);
          min = -(125.0f + gb) / ga;
          max = (125.0f-gb) / ga;
          if (min < MinVal[iv])  MinVal[iv] = min;
          if (max > MaxVal[iv])  MaxVal[iv] = max;
        }
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.