Examples of readUnsignedByte()


Examples of com.google.common.io.ByteArrayDataInput.readUnsignedByte()

  {
    try
    {
      EntityPlayer entityPlayer = (EntityPlayer) player;
      ByteArrayDataInput in = ByteStreams.newDataInput(packet.data);
      int packetId = in.readUnsignedByte(); // Assuming your packetId is between 0 (inclusive) and 256 (exclusive). If you need more you need to change this
      AbstractPacket ecPacket = AbstractPacket.constructPacket(packetId);
      ecPacket.read(in);
      ecPacket.execute(entityPlayer, entityPlayer.worldObj.isRemote ? Side.CLIENT : Side.SERVER);
    } catch (ProtocolException e)
    {
View Full Code Here

Examples of com.higherfrequencytrading.chronicle.Excerpt.readUnsignedByte()

            for (long i = j + 1; i <= j + blocks; i += batchSize) {
                while (!excerpt.nextIndex()) {
                    // busy wait
                }
                for (int k = 0; k < batchSize; k++) {
                    char ch = (char) excerpt.readUnsignedByte();
                    long l = excerpt.readLong();
                    float d = excerpt.readFloat();
                    assert ch == 'M';
                    assert l == i;
                    assert d == (float) i;
View Full Code Here

Examples of com.jme3.util.LittleEndien.readUnsignedByte()

                            index = (i * size) + j;
                        }
                        if (format == RawHeightMap.FORMAT_16BITBE) {
                            heightData[index] = dis.readUnsignedShort();
                        } else {
                            heightData[index] = dis.readUnsignedByte();
                        }
                    }
                }
                dis.close();
            }
View Full Code Here

Examples of com.peterhi.obsolete.Stream.readUnsignedByte()

      stream.writeBit(1);
     
      stream.readBit();
     
      for (int i = 0; i < sampleBytes().length; i++) {
        assertEquals(sampleBytes()[i] & 0xff, stream.readUnsignedByte());
      }
     
      assertEquals(1, stream.getData().readable());
    } finally {
    }
View Full Code Here

Examples of davaguine.jmac.tools.ByteArrayReader.readUnsignedByte()

            tag.Title = reader.readString(30, "US-ASCII");
            tag.Artist = reader.readString(30, "US-ASCII");
            tag.Album = reader.readString(30, "US-ASCII");
            tag.Year = reader.readString(4, "US-ASCII");
            tag.Comment = reader.readString(29, "US-ASCII");
            tag.Track = reader.readUnsignedByte();
            tag.Genre = reader.readUnsignedByte();
            return tag.Header.equals("TAG") ? tag : null;
        } catch (EOFException e) {
            return null;
        }
View Full Code Here

Examples of de.hpi.eworld.visualizer.simulation.traci.common.TraciInputStream.readUnsignedByte()

  public static ResponseVehicleValueCommandReader fromCommand(Command command) throws IOException, TraciException{
    TraciInputStream payload = command.getPayload();
   
    String objectId = new String(payload.readTraciString());
    // variable count == 1
    payload.readUnsignedByte();
    // variable id == POSITION (0x42)
    payload.readUnsignedByte();
    int status = payload.readUnsignedByte();
    if (status == 0xff){
      payload.readUnsignedByte(); // type: String
View Full Code Here

Examples of de.uniluebeck.itm.tcpip.Storage.readUnsignedByte()

    @Override
    protected Color readValue(Command resp) throws TraCIException {
      Storage content = resp.content();
      Utils.checkType(content, Constants.TYPE_COLOR);
      int r = content.readUnsignedByte();
      int g = content.readUnsignedByte();
      int b = content.readUnsignedByte();
      int a = content.readUnsignedByte();
      return new Color(r, g, b, a);
    }
View Full Code Here

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

    @Override
    protected void channelRead0(ChannelHandlerContext ctx, DatagramPacket msg) throws Exception
    {
        ByteBuf in = msg.content();
        if ( in.readUnsignedByte() != 0xFE || in.readUnsignedByte() != 0xFD )
        {
            bungee.getLogger().log( Level.WARNING, "Query - Incorrect magic!: {0}", msg.sender() );
            return;
        }
View Full Code Here

Examples of java.io.DataInput.readUnsignedByte()

                            break;
                        case Short:
                            heightData[index] = di.readShort() * 0.5f / Short.MAX_VALUE + 0.5f;
                            break;
                        case UnsignedByte:
                            heightData[index] = di.readUnsignedByte() * 0.5f / Byte.MAX_VALUE;
                            break;
                        case UnsignedShort:
                            heightData[index] = di.readUnsignedShort() * 0.5f / Short.MAX_VALUE;
                            break;
                        case Integer:
View Full Code Here

Examples of java.io.DataInputStream.readUnsignedByte()

        while (! parent.finished) {

          sleep(10);
          while (r.available() > 0) {

            int b = r.readUnsignedByte() ;
            if (b != '\r') {

              if (b == '\n') {

                println(tmp.toString()) ;
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.