package org.kne.cloud.network;

import java.io.DataInputStream;
import java.io.IOException;
import java.io.InputStream;

public class KLALBDetectorItem implements ProtocolDetectorItem {

	@Override
	public Protocol apply(InputStream t) {
		try {
			byte[]b=new byte[5];
			new DataInputStream(t).readFully(b);
			String s=new String(b, "ascii");
			if(s.equals("KLALB")) {
				return new Protocol("KLALB");
			}
		} catch (IOException e) {
		}
		return null;
	}

}
