package org.kne.cloud.network.klalb;

import java.io.DataInput;
import java.io.DataInputStream;
import java.io.DataOutput;
import java.io.DataOutputStream;
import java.io.IOException;
import java.nio.ByteBuffer;

public class BWINFPacket extends KLALBPacket {

	private static final int HEADER_LENGTH=17;

	public long getUpSpeed() {
		return klalbHeader.getLong(1);
	}

	public long getDownSpeed() {
		return klalbHeader.getLong(9);
	}

	@Override
	public long getTotalLength() {
		return super.getTotalLength();
	}

	public BWINFPacket(long upSpeed,long downSpeed) {
		super( BWINF,HEADER_LENGTH);
		klalbHeader.putLong(upSpeed);
		klalbHeader.putLong(downSpeed);
	}
	public BWINFPacket(ByteBuffer bb) {
		super(bb,HEADER_LENGTH);
	}

	@Override
	public String toString() {
		return " BWINF";
	}

}
