X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=common%2Fconcepts%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fyangtools%2Fconcepts%2FWritableObjects.java;fp=common%2Fconcepts%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fyangtools%2Fconcepts%2FWritableObjects.java;h=57a3714257860bcacf8e6c12753a9689c14f828c;hb=878591401555a4687df736bb8da956479dd426e3;hp=e300696b8911087d44774e481dfdec23d52ae9de;hpb=f45fa11f9634949fcf36cfc79122c113995c56de;p=yangtools.git diff --git a/common/concepts/src/main/java/org/opendaylight/yangtools/concepts/WritableObjects.java b/common/concepts/src/main/java/org/opendaylight/yangtools/concepts/WritableObjects.java index e300696b89..57a3714257 100644 --- a/common/concepts/src/main/java/org/opendaylight/yangtools/concepts/WritableObjects.java +++ b/common/concepts/src/main/java/org/opendaylight/yangtools/concepts/WritableObjects.java @@ -42,12 +42,12 @@ public final class WritableObjects { * serializing counters and similar, which have a wide range, but typically do not use it. The value provided is * treated as unsigned. * - * This methods writes the number of trailing non-zero in the value. It then writes the minimum required bytes + *

This methods writes the number of trailing non-zero in the value. It then writes the minimum required bytes * to reconstruct the value by left-padding zeroes. Inverse operation is performed by {@link #readLong(DataInput)} * or a combination of {@link #readLongHeader(DataInput)} and {@link #readLongBody(DataInput, byte)}. * - * Additionally the caller can use the top four bits (i.e. 0xF0) for caller-specific flags. These will be ignored - * by {@link #readLong(DataInput)}, but can be extracted via {@link #readLongHeader(DataInput)}. + *

Additionally the caller can use the top four bits (i.e. 0xF0) for caller-specific flags. These will be + * ignored by {@link #readLong(DataInput)}, but can be extracted via {@link #readLongHeader(DataInput)}. * * @param out Data output * @param value long value to write @@ -103,6 +103,7 @@ public final class WritableObjects { * * @param in Data input * @param header Value header, as returned by {@link #readLongHeader(DataInput)} + * @return long value * @throws IOException if an I/O error occurs * @throws NullPointerException if input is null */ @@ -135,8 +136,8 @@ public final class WritableObjects { * Write two consecutive long values. These values can be read back using {@link #readLongHeader(DataInput)}, * {@link #readFirstLong(DataInput, byte)} and {@link #readSecondLong(DataInput, byte)}. * - * This is a more efficient way of serializing two longs than {@link #writeLong(DataOutput, long)}. This is achieved - * by using the flags field to hold the length of the second long -- hence saving one byte. + *

This is a more efficient way of serializing two longs than {@link #writeLong(DataOutput, long)}. This is + * achieved by using the flags field to hold the length of the second long -- hence saving one byte. * * @param out Data output * @param value0 first long value to write @@ -144,7 +145,8 @@ public final class WritableObjects { * @throws IOException if an I/O error occurs * @throws NullPointerException if output is null */ - public static void writeLongs(final @Nonnull DataOutput out, final long value0, final long value1) throws IOException { + public static void writeLongs(final @Nonnull DataOutput out, final long value0, final long value1) + throws IOException { final int clen = WritableObjects.valueBytes(value1); writeLong(out, value0, clen << 4); WritableObjects.writeValue(out, value1, clen);