Package com.knuddels.jtokkit
Class Encodings
java.lang.Object
com.knuddels.jtokkit.Encodings
-
Method Summary
Modifier and TypeMethodDescriptionstatic EncodingRegistryCreates a newEncodingRegistrywith the default encodings found in theEncodingTypeenum.static EncodingRegistryCreates a newEncodingRegistrywithout anyEncodingTyperegistered.
-
Method Details
-
newDefaultEncodingRegistry
Creates a newEncodingRegistrywith the default encodings found in theEncodingTypeenum.- Returns:
- the new
EncodingRegistry
-
newLazyEncodingRegistry
Creates a newEncodingRegistrywithout anyEncodingTyperegistered. Encodings will be loaded on-demand when they are first requested. For example, if you callEncodingRegistry.getEncoding(EncodingType)withEncodingType.CL100K_BASEfor the first time, it will be loaded from the classpath. Subsequent calls withEncodingType.CL100K_BASEwill re-use the already loaded encoded.- Returns:
- the new
EncodingRegistry
-