X-Git-Url: http://www2.svjatoslav.eu/gitweb/?p=svjatoslav_commons.git;a=blobdiff_plain;f=src%2Fmain%2Fjava%2Feu%2Fsvjatoslav%2Fcommons%2Fdata%2FEnhancedDataInputStream.java;h=45fcaf5bde9b7150267632be06b293c93c2662db;hp=15a0e8c22146e06fffb27ad805929c09b0b99a91;hb=9bf004ce4e9b5edff36c65fcc8cc0f303390d7fc;hpb=afaa928dd10304ee3e8e6bad3a377ced6a7b2f42 diff --git a/src/main/java/eu/svjatoslav/commons/data/EnhancedDataInputStream.java b/src/main/java/eu/svjatoslav/commons/data/EnhancedDataInputStream.java index 15a0e8c..45fcaf5 100755 --- a/src/main/java/eu/svjatoslav/commons/data/EnhancedDataInputStream.java +++ b/src/main/java/eu/svjatoslav/commons/data/EnhancedDataInputStream.java @@ -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 readIntegerList() throws IOException { - final int length = readInt(); + public List readIntegerList() throws IOException { + final int length = readInt(); - final List result = new ArrayList(); + final List 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"); + } }