Code cleanup and formatting. Migrated to java 1.8.
[svjatoslav_commons.git] / src / main / java / eu / svjatoslav / commons / data / EnhancedDataInputStream.java
old mode 100644 (file)
new mode 100755 (executable)
index b0db879..45fcaf5
@@ -1,10 +1,10 @@
 /*
  * Svjatoslav Commons - shared library of common functionality.
- * Copyright ©2012-2013, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu
+ * Copyright ©2012-2014, 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.
+ * modify it under the terms of version 3 of the GNU Lesser General Public License
+ * or later as published by the Free Software Foundation.
  */
 
 package eu.svjatoslav.commons.data;
@@ -17,31 +17,31 @@ import java.util.List;
 
 public class EnhancedDataInputStream extends DataInputStream {
 
-       public EnhancedDataInputStream(final InputStream in) {
-               super(in);
-       }
+    public EnhancedDataInputStream(final InputStream in) {
+        super(in);
+    }
 
-       public List<Integer> readIntegerList() throws IOException {
-               final int length = readInt();
+    public List<Integer> readIntegerList() throws IOException {
+        final int length = readInt();
 
-               final List<Integer> result = new ArrayList<Integer>();
+        final List<Integer> result = new ArrayList<>();
 
-               for (int i = 0; i < length; i++)
-                       result.add(readInt());
+        for (int i = 0; i < length; i++)
+            result.add(readInt());
 
-               return result;
-       }
+        return result;
+    }
 
-       public String readString() throws IOException {
+    public String readString() throws IOException {
 
-               final int length = readInt();
-               if (length == -1)
-                       return null;
+        final int length = readInt();
+        if (length == -1)
+            return null;
 
-               final byte[] bytes = new byte[length];
-               readFully(bytes);
+        final byte[] bytes = new byte[length];
+        readFully(bytes);
 
-               return new String(bytes, "UTF-8");
-       }
+        return new String(bytes, "UTF-8");
+    }
 
 }