@Test void testByteHexDirName() { assertThat(TagUtil.byteHexDirName(0x00000001)).isEqualTo("01/"); assertThat(TagUtil.byteHexDirName(0x00000b0a)).isEqualTo("0a/0b/"); assertThat(TagUtil.byteHexDirName(0x000c0b0a)).isEqualTo("0a/0b/0c/"); assertThat(TagUtil.byteHexDirName(0x0d0c0b0a)).isEqualTo("0a/0b/0c/0d/"); }
static String byteHexDirName(int majorRevision) { if (majorRevision <= 0) { throw new IllegalArgumentException("invalid majorRevision " + majorRevision + " (expected: > 0)"); } final StringBuilder sb = new StringBuilder(16); final int shift = 8; do { sb.append(TABLE[majorRevision & 0xFF]); majorRevision >>>= shift; } while (majorRevision != 0); return sb.toString(); }
TagUtil { static String byteHexDirName(int majorRevision) { if (majorRevision <= 0) { throw new IllegalArgumentException("invalid majorRevision " + majorRevision + " (expected: > 0)"); } final StringBuilder sb = new StringBuilder(16); final int shift = 8; do { sb.append(TABLE[majorRevision & 0xFF]); majorRevision >>>= shift; } while (majorRevision != 0); return sb.toString(); } }
TagUtil { static String byteHexDirName(int majorRevision) { if (majorRevision <= 0) { throw new IllegalArgumentException("invalid majorRevision " + majorRevision + " (expected: > 0)"); } final StringBuilder sb = new StringBuilder(16); final int shift = 8; do { sb.append(TABLE[majorRevision & 0xFF]); majorRevision >>>= shift; } while (majorRevision != 0); return sb.toString(); } private  TagUtil(); }
TagUtil { static String byteHexDirName(int majorRevision) { if (majorRevision <= 0) { throw new IllegalArgumentException("invalid majorRevision " + majorRevision + " (expected: > 0)"); } final StringBuilder sb = new StringBuilder(16); final int shift = 8; do { sb.append(TABLE[majorRevision & 0xFF]); majorRevision >>>= shift; } while (majorRevision != 0); return sb.toString(); } private  TagUtil();  }
TagUtil { static String byteHexDirName(int majorRevision) { if (majorRevision <= 0) { throw new IllegalArgumentException("invalid majorRevision " + majorRevision + " (expected: > 0)"); } final StringBuilder sb = new StringBuilder(16); final int shift = 8; do { sb.append(TABLE[majorRevision & 0xFF]); majorRevision >>>= shift; } while (majorRevision != 0); return sb.toString(); } private  TagUtil();   }