readUTF() public method

public readUTF ( ) : global::java.lang.String
return global::java.lang.String
Example #1
0
 public override void readPacketData(DataInputStream datainputstream)
 {
     protocolVersion = datainputstream.readInt();
     username = datainputstream.readUTF();
     password = datainputstream.readUTF();
     mapSeed = datainputstream.readLong();
     dimension = datainputstream.readByte();
 }
Example #2
0
        public static List readWatchableObjects(DataInputStream datainputstream)
        {
            ArrayList arraylist = null;
            for (byte byte0 = datainputstream.readByte(); byte0 != 127; byte0 = datainputstream.readByte())
            {
                if (arraylist == null)
                {
                    arraylist = new ArrayList();
                }
                int i = (byte0 & 0xe0) >> 5;
                int j = byte0 & 0x1f;
                WatchableObject watchableobject = null;
                switch (i)
                {
                    case 0: // '\0'
                        watchableobject = new WatchableObject(i, j, Byte.valueOf(datainputstream.readByte()));
                        break;

                    case 1: // '\001'
                        watchableobject = new WatchableObject(i, j, Short.valueOf(datainputstream.readShort()));
                        break;

                    case 2: // '\002'
                        watchableobject = new WatchableObject(i, j, Integer.valueOf(datainputstream.readInt()));
                        break;

                    case 3: // '\003'
                        watchableobject = new WatchableObject(i, j, Float.valueOf(datainputstream.readFloat()));
                        break;

                    case 4: // '\004'
                        watchableobject = new WatchableObject(i, j, datainputstream.readUTF());
                        break;

                    case 5: // '\005'
                        short word0 = datainputstream.readShort();
                        byte byte1 = datainputstream.readByte();
                        short word1 = datainputstream.readShort();
                        watchableobject = new WatchableObject(i, j, new ItemStack(word0, byte1, word1));

                        // fall through (not.. c#..)

                        int k2 = datainputstream.readInt();
                        int l2 = datainputstream.readInt();
                        int i12 = datainputstream.readInt();
                        watchableobject = new WatchableObject(i, j, new ChunkCoordinates(k2, l2, i12));

                        break;
                    case 6: // '\006'
                        int k = datainputstream.readInt();
                        int l = datainputstream.readInt();
                        int i1 = datainputstream.readInt();
                        watchableobject = new WatchableObject(i, j, new ChunkCoordinates(k, l, i1));
                        break;
                }
                arraylist.add(watchableobject);
            }

            return arraylist;
        }
Example #3
0
 public override void readPacketData(DataInputStream datainputstream)
 {
     windowId = datainputstream.readByte();
     inventoryType = datainputstream.readByte();
     windowTitle = datainputstream.readUTF();
     slotsCount = datainputstream.readByte();
 }
 public override void readPacketData(DataInputStream datainputstream)
 {
     entityId = datainputstream.readInt();
     name = datainputstream.readUTF();
     xPosition = datainputstream.readInt();
     yPosition = datainputstream.readInt();
     zPosition = datainputstream.readInt();
     rotation = datainputstream.readByte();
     pitch = datainputstream.readByte();
     currentItem = datainputstream.readShort();
 }
Example #5
0
 public override void readPacketData(DataInputStream datainputstream)
 {
     xPosition = datainputstream.readInt();
     yPosition = datainputstream.readShort();
     zPosition = datainputstream.readInt();
     signLines = new string[4];
     for (int i = 0; i < 4; i++)
     {
         signLines[i] = datainputstream.readUTF();
     }
 }
Example #6
0
 public override void readPacketData(DataInputStream datainputstream)
 {
     username = datainputstream.readUTF();
 }
 public override void readPacketData(DataInputStream datainputstream)
 {
     reason = datainputstream.readUTF();
 }