@Test public void getVirtualSizeTest() throws IOException { assertEquals(virtualSize.longValue(), QCOW2Utils.getVirtualSize(inputStream)); }
public static long getVirtualSize(final InputStream inputStream) throws IOException { final byte[] bytes = new byte[VIRTUALSIZE_HEADER_LENGTH]; if (inputStream.skip(VIRTUALSIZE_HEADER_LOCATION) != VIRTUALSIZE_HEADER_LOCATION) { throw new IOException("Unable to skip to the virtual size header"); } if (inputStream.read(bytes) != VIRTUALSIZE_HEADER_LENGTH) { throw new IOException("Unable to properly read the size"); } return NumbersUtil.bytesToLong(bytes); }
QCOW2Utils { public static long getVirtualSize(final InputStream inputStream) throws IOException { final byte[] bytes = new byte[VIRTUALSIZE_HEADER_LENGTH]; if (inputStream.skip(VIRTUALSIZE_HEADER_LOCATION) != VIRTUALSIZE_HEADER_LOCATION) { throw new IOException("Unable to skip to the virtual size header"); } if (inputStream.read(bytes) != VIRTUALSIZE_HEADER_LENGTH) { throw new IOException("Unable to properly read the size"); } return NumbersUtil.bytesToLong(bytes); } }
QCOW2Utils { public static long getVirtualSize(final InputStream inputStream) throws IOException { final byte[] bytes = new byte[VIRTUALSIZE_HEADER_LENGTH]; if (inputStream.skip(VIRTUALSIZE_HEADER_LOCATION) != VIRTUALSIZE_HEADER_LOCATION) { throw new IOException("Unable to skip to the virtual size header"); } if (inputStream.read(bytes) != VIRTUALSIZE_HEADER_LENGTH) { throw new IOException("Unable to properly read the size"); } return NumbersUtil.bytesToLong(bytes); } private  QCOW2Utils(); }
QCOW2Utils { public static long getVirtualSize(final InputStream inputStream) throws IOException { final byte[] bytes = new byte[VIRTUALSIZE_HEADER_LENGTH]; if (inputStream.skip(VIRTUALSIZE_HEADER_LOCATION) != VIRTUALSIZE_HEADER_LOCATION) { throw new IOException("Unable to skip to the virtual size header"); } if (inputStream.read(bytes) != VIRTUALSIZE_HEADER_LENGTH) { throw new IOException("Unable to properly read the size"); } return NumbersUtil.bytesToLong(bytes); } private  QCOW2Utils(); static int getVirtualSizeHeaderLocation(); static long getVirtualSize(final InputStream inputStream); }
QCOW2Utils { public static long getVirtualSize(final InputStream inputStream) throws IOException { final byte[] bytes = new byte[VIRTUALSIZE_HEADER_LENGTH]; if (inputStream.skip(VIRTUALSIZE_HEADER_LOCATION) != VIRTUALSIZE_HEADER_LOCATION) { throw new IOException("Unable to skip to the virtual size header"); } if (inputStream.read(bytes) != VIRTUALSIZE_HEADER_LENGTH) { throw new IOException("Unable to properly read the size"); } return NumbersUtil.bytesToLong(bytes); } private  QCOW2Utils(); static int getVirtualSizeHeaderLocation(); static long getVirtualSize(final InputStream inputStream);  }