Code example for LinkedList

Methods: add

0
public class ByteBuffer { 
 
	LinkedList<Integer> bytes = new LinkedList<Integer>();
 
	public void writeUnsignedByte(int s) {
		bytes.add(s - Byte.MAX_VALUE);
	} 
 
	public void writeUnsignedShort(int s) {
		writeUnsignedByte(s & 0xFF);
		writeUnsignedByte((s >> 8) & 0xFF);
	} 
 
	public void writeShort(short s) {
		writeUnsignedByte(s & 0xFF);
		writeUnsignedByte((s >> 8) & 0xFF);
	} 
 
	public void writeInt(int i) {
		writeUnsignedByte(i & 0xFF);
Stop searching for code, let great code find you!  Add Codota to your java IDE