Moved bit input and output streams into Svjatoslav Commons library.
[imagesqueeze.git] / src / main / java / eu / svjatoslav / imagesqueeze / codec / ImageMetaData.java
index 68b3bea..4b21a22 100755 (executable)
@@ -1,3 +1,12 @@
+/*
+ * Imagesqueeze - Image codec optimized for photos.
+ * Copyright (C) 2012, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu
+ * 
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of version 2 of the GNU General Public License
+ * as published by the Free Software Foundation.
+ */
+
 package eu.svjatoslav.imagesqueeze.codec;
 
 /**
@@ -7,6 +16,8 @@ package eu.svjatoslav.imagesqueeze.codec;
 
 import java.io.IOException;
 
+import eu.svjatoslav.commons.data.BitInputStream;
+import eu.svjatoslav.commons.data.BitOutputStream;
 
 public class ImageMetaData {
 
@@ -14,16 +25,15 @@ public class ImageMetaData {
        int width;
        int height;
 
+       public void load(final BitInputStream inputStream) throws IOException {
 
-       public void load(BitInputStream inputStream) throws IOException{
-
-               version = inputStream.readBits(16);
+               version = inputStream.readBits(16);
                width = inputStream.readIntegerCompressed8();
                height = inputStream.readIntegerCompressed8();
 
        }
 
-       public void save(BitOutputStream outputStream) throws IOException{
+       public void save(final BitOutputStream outputStream) throws IOException {
 
                outputStream.storeBits(version, 16);
                outputStream.storeIntegerCompressed8(width);