@Test public void testNewOidStringBad() { assertFalse( Oid.isOid( "0" ) ); assertFalse( Oid.isOid( "1" ) ); assertFalse( Oid.isOid( "0." ) ); assertFalse( Oid.isOid( "1." ) ); assertFalse( Oid.isOid( "2." ) ); assertFalse( Oid.isOid( "2." ) ); assertFalse( Oid.isOid( "." ) ); assertFalse( Oid.isOid( "0.1.2." ) ); assertFalse( Oid.isOid( "3.1" ) ); assertFalse( Oid.isOid( "0..1" ) ); assertFalse( Oid.isOid( "0..12" ) ); assertFalse( Oid.isOid( "0.a.2" ) ); assertFalse( Oid.isOid( "0.40" ) ); assertFalse( Oid.isOid( "0.51" ) ); assertFalse( Oid.isOid( "0.01" ) ); assertFalse( Oid.isOid( "0.123456" ) ); assertFalse( Oid.isOid( "1.123456" ) ); }
public static boolean isOid( String oidString ) { try { Oid.fromString( oidString ); return true; } catch ( DecoderException e ) { return false; } }
Oid { public static boolean isOid( String oidString ) { try { Oid.fromString( oidString ); return true; } catch ( DecoderException e ) { return false; } } }
Oid { public static boolean isOid( String oidString ) { try { Oid.fromString( oidString ); return true; } catch ( DecoderException e ) { return false; } } private  Oid( String oidString, byte[] oidBytes ); }
Oid { public static boolean isOid( String oidString ) { try { Oid.fromString( oidString ); return true; } catch ( DecoderException e ) { return false; } } private  Oid( String oidString, byte[] oidBytes ); @Override boolean equals( Object other ); static Oid fromBytes( byte[] oidBytes ); static Oid fromString( String oidString ); int getEncodedLength(); @Override int hashCode(); static boolean isOid( String oidString ); byte[] toBytes(); @Override String toString(); void writeBytesTo( ByteBuffer buffer ); void writeBytesTo( OutputStream outputStream ); }
Oid { public static boolean isOid( String oidString ) { try { Oid.fromString( oidString ); return true; } catch ( DecoderException e ) { return false; } } private  Oid( String oidString, byte[] oidBytes ); @Override boolean equals( Object other ); static Oid fromBytes( byte[] oidBytes ); static Oid fromString( String oidString ); int getEncodedLength(); @Override int hashCode(); static boolean isOid( String oidString ); byte[] toBytes(); @Override String toString(); void writeBytesTo( ByteBuffer buffer ); void writeBytesTo( OutputStream outputStream );  }