Code example for DataInputStream

Methods: readreadInt

0
	public void setInputStream(InputStream in) {
		stream = new DataInputStream(in);
	} 
	 
	private String getInputData(DataInputStream stream) throws IOException {		
		int size = stream.readInt();
		byte[] data = new byte[size];
		stream.read(data,0,size);
		return new String(data);
	} 
 
} 
Stop searching for code, let great code find you!  Add Codota to your java IDE