ByteUtil { public static String formatIntAsIpAddress(final int address) { StringBuilder buffer = new StringBuilder(); formatIntAsIpAddress(buffer, address); return buffer.toString(); }  static void writeLongAsAscii(final byte[] outputBuffer, final int offset, final long valueParam); static boolean isAsciiDigit(final byte asciiCharacter); static String formatIntAsIpAddress(final int address); static void formatIntAsIpAddress(final StringBuilder buffer, final int address); static long packLongWithUnsignedShortInts(final int int1, final int int2, final int int3, final int int4); static boolean isEqual(final byte[] lhs, final int lhsOffset, final byte[] rhs, final int rhsOffset, final int length); static int readIntFromAscii(final byte[] asciiBuffer, final int offset, final int length); static long readLongFromAscii(final byte[] asciiBuffer, final int offset, final int length); static boolean isInteger(final byte[] asciiBuffer, final int offset, final int length); static void replace(final byte[] buffer, final int offset, final int length,
                               final byte target, final byte replacement); static void asciiEncode(final CharSequence chars, final int charOffset,
                                   final byte[] buffer, final int bufferOffset, final int length); static final int MAX_UNSIGNED_SHORT; }
@Test public void shouldFormatIpAddressAsString() { final int offset = 0; final int address = Bits.readInt(new byte[]{(byte) 192, (byte) 168, (byte) 70, (byte) 12}, offset); assertEquals("192.168.70.12", ByteUtil.formatIntAsIpAddress(address)); }