code: public static long getSize(byte[] byteSize) {
  	if (byteSize.length!=4) {
  		return 0;
  	}
  	ByteBuffer converterBuffer = ByteBuffer.wrap(byteSize);
  	converterBuffer.order(ByteOrder.LITTLE_ENDIAN);
  	return convertSignedIntToUnsigned(converterBuffer.getInt());
  }
docs: Reads a size from a reversed byte order, such as block size in the block header
  
  @param byteSize byte array with a length of exactly 4
  
  @return size, returns 0 in case of invalid block size