X-Git-Url: http://www2.svjatoslav.eu/gitweb/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Feu%2Fsvjatoslav%2Fcommons%2Fdata%2FEnhancedDataOutputStream.java;h=c84d2dab7fb50a80bf857b097155e4664ab9999d;hb=b8bd1e820265fc15c39c1ee8c06289ea8b8e2c1c;hp=89f08a9e025e54f079b0ea51bdb6ebefc4e98c23;hpb=b34ba4499cfbca09bc794a810e460bf1c86dcd34;p=svjatoslav_commons.git diff --git a/src/main/java/eu/svjatoslav/commons/data/EnhancedDataOutputStream.java b/src/main/java/eu/svjatoslav/commons/data/EnhancedDataOutputStream.java index 89f08a9..c84d2da 100755 --- a/src/main/java/eu/svjatoslav/commons/data/EnhancedDataOutputStream.java +++ b/src/main/java/eu/svjatoslav/commons/data/EnhancedDataOutputStream.java @@ -1,7 +1,7 @@ /* * Svjatoslav Commons - shared library of common functionality. - * Copyright ©2012-2014, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu - * + * Copyright ©2012-2017, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu + * * This program is free software; you can redistribute it and/or * modify it under the terms of version 3 of the GNU Lesser General Public License * or later as published by the Free Software Foundation. @@ -16,27 +16,27 @@ import java.util.List; public class EnhancedDataOutputStream extends DataOutputStream { - public EnhancedDataOutputStream(final OutputStream out) { - super(out); - } + public EnhancedDataOutputStream(final OutputStream out) { + super(out); + } - public void writeIntegerList(final List list) throws IOException { - writeInt(list.size()); + public void writeIntegerList(final List list) throws IOException { + writeInt(list.size()); - for (final Integer integer : list) - writeInt(integer); - } + for (final Integer integer : list) + writeInt(integer); + } - public void writeString(final String string) throws IOException { - if (string == null) { - writeInt(-1); - return; - } + public void writeString(final String string) throws IOException { + if (string == null) { + writeInt(-1); + return; + } - final byte[] bytes = string.getBytes("UTF-8"); + final byte[] bytes = string.getBytes("UTF-8"); - writeInt(bytes.length); - write(bytes); - } + writeInt(bytes.length); + write(bytes); + } }