Code example for DataInputStream

Methods: readreadIntreadUnsignedShort

	private int nameIndex;
	private byte[] info;
	private String attributeName;
	public AttributeInfo(ConstantPool constantPool, DataInputStream dis) throws IOException {
		nameIndex = dis.readUnsignedShort();
		int attrLength = dis.readInt();
		info = new byte[attrLength];;
		attributeName = constantPool.getUTF8Info(nameIndex).getValue();
	public int getNameIndex() { 
		return nameIndex;
	public String getAttributeName() {
		return attributeName;
Connect your IDE to all the code out there  Get Codota for Java