Package com.ibm.cloud.sdk.core.util
Utility classes to detect media types and convert files into input streams.
-
Class Summary Class Description BooleanToStringTypeAdapter This TypeAdapter converts "yes", "no", "true", and "false" to Booleans and vice versa.ByteArrayTypeAdapter This class serves as a GSON type adapter for the "byte[]" type.Clock Wrapper class for getting the current time.CredentialUtils CredentialUtils retrieves service credentials from the environment.CredentialUtils.VcapCredentials This class is used to unmarshal the contents of the "credentials" field within a vcap service entry.CredentialUtils.VcapService This class is used to unmarshal an item in the list of services belonging to a particular service key.DateTimeTypeAdapter This class handles the serialization and deserialization ofDate
instances that should be interpretted as OpenAPI "date-time" values.
This is the default type adapter that we register with Gson for handlingDate
fields.DateTypeAdapter This class handles the serialization and deserialization ofDate
instances that should interpretted as OpenAPI "date" values.
This type adapter is used by setting theJsonAdapter
annotation on a field of typeDate
.DateUtils This class contains utilities for formatting and parsingDate
instances as OpenAPI "date" or "date-time" values.DiscriminatorBasedTypeAdapterFactory This class is registered with Gson to perform deserialization of classes that have discriminator metadata defined in them.DiscriminatorBasedTypeAdapterFactory.Adapter<T> An adapter for serializing/deserializing instances of type T, where T represents a generated model that defines a discriminator to aid in deserialization.DynamicModelTypeAdapterFactory This class is registered with Gson to perform serialization and deserialization for dynamic model classes.DynamicModelTypeAdapterFactory.Adapter<T> An adapter for serializing/deserializing instances of type T, where T represents a generated dynamic model class which is a subclass of DynamicModel.EnvironmentUtils This is a utility class that contains methods related to environment variables.GsonSerializationHelper Deprecated. This class should no longer be needed once users upgrade to a recent version of the package that contains the new DynamicModel pattern.GsonSingleton Gson singleton to be use when transforming from JSON to Java Objects and vise versa.HttpLogging Deprecated. This class functionality is now handled byHttpConfigOptions
and should no longer be needed.LongToDateTypeAdapter This TypeAdapter converts unix timestamps (in numeric or String form) to Java Dates and vice versa.MapValueObjectTypeAdapter This class is adapted from the ObjectTypeAdapter from the GSON project.RequestUtils Utility functions to use when creating aRequestBuilder
.ResponseConverterUtils Utility class to convert service responses into aResponseConverter
.ResponseUtils Utility class to manage service responses.StringHelper Helper class used by java code generated by the SDK codegen tool.UrlHelper Validator This class assists in validating arguments.
If an argument value is deemed invalid, an IllegalArgumentException is thrown.