Code example for DataOutputStream

Methods: writeInt, writeShort

0
	/** 
	 * Abstract. Writes the raw packet data to the data stream. 
	 */ 
	@Override 
	public void writePacketData(DataOutputStream par1DataOutputStream) throws IOException {
		par1DataOutputStream.writeInt(this.entityID);
		par1DataOutputStream.writeShort(this.slot);
		writeItemStack(this.field_73399_c, par1DataOutputStream);
	} 
 
	/** 
	 * Passes this Packet on to the NetHandler for processing. 
	 */ 
	@Override 
	public void processPacket(NetHandler par1NetHandler) {
		par1NetHandler.handlePlayerInventory(this);
	} 
 
	/** 
	 * Abstract. Return the size of the packet (not counting the header). 
	 */