class OidType extends AbstractDERType implements DEREncoder {

  public static String decode(final DERBuffer encoded)
  {
    final StringBuilder sb = new StringBuilder();
    final int firstId = encoded.get();
    // CheckStyle:MagicNumber OFF
    if (firstId < 40) {
      sb.append("0").append(".").append(firstId).append(".");
    } else if (firstId < 80) {
      sb.append("1").append(".").append(firstId - 40).append(".");
    } else {
      sb.append("2").append(".").append(firstId - 80).append(".");
    }
    // CheckStyle:MagicNumber ON
    while (encoded.hasRemaining()) {
      sb.append(readInt(encoded)).append(".");
    }
    sb.setLength(sb.length() - 1);
    return sb.toString();
  }

  public  OidType(final String item);
  public  OidType(final int[] item);
  public  OidType(final DERTag tag, final String item);
  public  OidType(final DERTag tag, final int[] item);

}