public static Encoder forName ( String contextName ) throws NullPointerException , UnsupportedContextException { if ( contextName == null ) { throw new NullPointerException ( ) ; } Encoder encoder = ENCODERS_MAP . get ( contextName ) ; if ( encoder == null ) { throw new UnsupportedContextException ( contextName ) ; } return encoder ; }
Returns a new instance of an Encoder for the specified context . The returned instance is thread - safe .