Package net.minecraft.util.io.netty.buffer

Examples of net.minecraft.util.io.netty.buffer.ByteBuf.readBytes()


          byte[] encoded = segment.substring(7).getBytes(Charsets.UTF_8);
          ByteBuf decoded = Base64.decode(Unpooled.wrappedBuffer(encoded));
         
          // Read into a byte array
          byte[] data = new byte[decoded.readableBytes()];
          decoded.readBytes(data);
          this.data = data;
        } else {
          // We will ignore these segments
        }
      }
View Full Code Here


      if (MinecraftReflection.isUsingNetty()) {
        ByteBuf buffer = createPacketBuffer();
        MinecraftMethods.getPacketWriteByteBufMethod().invoke(handle, buffer);
       
        output.writeInt(buffer.readableBytes());
        buffer.readBytes(output, buffer.readableBytes());
       
      } else {
        // Call the write-method
        output.writeInt(-1);
        getMethodLazily(writeMethods, handle.getClass(), "write", DataOutput.class).
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.