Code cleanup and formatting. Migrated to java 1.8.
[svjatoslav_commons.git] / src / main / java / eu / svjatoslav / commons / data / EnhancedDataInputStream.java
index 15a0e8c..45fcaf5 100755 (executable)
@@ -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");
+    }
 
 }