diff options
author | Manuel Bentele | 2021-05-19 09:01:38 +0200 |
---|---|---|
committer | Manuel Bentele | 2021-05-19 09:01:38 +0200 |
commit | adc19701eafcd18a746a57dc0a610a614e1d80cf (patch) | |
tree | df9f27c6172684909ed1c5ffede2a46243322a8d /src/main/java/org/openslx/vm/disk/DiskImageUtils.java | |
parent | Remove needless reference to internal/private Maven repository (diff) | |
parent | Implements XML schema validation for VirtualBox configurations (diff) | |
download | master-sync-shared-adc19701eafcd18a746a57dc0a610a614e1d80cf.tar.gz master-sync-shared-adc19701eafcd18a746a57dc0a610a614e1d80cf.tar.xz master-sync-shared-adc19701eafcd18a746a57dc0a610a614e1d80cf.zip |
Merge branch 'feature/qemu-integration'
Diffstat (limited to 'src/main/java/org/openslx/vm/disk/DiskImageUtils.java')
-rw-r--r-- | src/main/java/org/openslx/vm/disk/DiskImageUtils.java | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/src/main/java/org/openslx/vm/disk/DiskImageUtils.java b/src/main/java/org/openslx/vm/disk/DiskImageUtils.java index fbed6f9..ccb053f 100644 --- a/src/main/java/org/openslx/vm/disk/DiskImageUtils.java +++ b/src/main/java/org/openslx/vm/disk/DiskImageUtils.java @@ -114,12 +114,12 @@ public class DiskImageUtils } /** - * Reads two bytes ({@link Short}) at a given <code>offset</code> from the specified disk image - * file. + * Reads a variable number of bytes (<code>numBytes</code>) at a given <code>offset</code> from the specified disk image file. * * @param diskImage file to a disk storing the image content. - * @param offset offset in bytes for reading the two bytes. - * @return value of the two bytes from the disk image file as {@link Short}. + * @param offset offset in bytes for reading <code>numBytes</code> bytes. + * @param numBytes number of bytes to read at <code>offset</code>. + * @return read bytes from the disk image file as {@link String}. * * @throws DiskImageException unable to read two bytes from the disk image file. */ @@ -141,14 +141,4 @@ public class DiskImageUtils return new String( values ); } - - public static int versionFromMajorMinor( final short major, final short minor ) - { - return ( ( Integer.valueOf( major ) << 16 ) | minor ); - } - - public static int versionFromMajor( final short major ) - { - return DiskImageUtils.versionFromMajorMinor( major, Short.valueOf( "0" ) ); - } } |