Code example for DataInputStream

Methods: readFully, readInt, readLong, readUTF

0
	public void handle(DataInputStream is, DataOutputStream os, boolean debug)
			throws DiSLREServerException { 
 
		try { 
 
			String className = is.readUTF();
			long oid = is.readLong();
			ShadowObject classLoader = ShadowObjectTable.get(oid);
			int classCodeLength = is.readInt();
			byte[] classCode = new byte[classCodeLength];
			is.readFully(classCode);
 
			ShadowClassTable.load(classLoader, className, classCode, debug);
		} catch (IOException e) {
			throw new DiSLREServerException(e);
		} 
	} 
 
	public void exit() { 
 
	}