Common classes in Android and Nokia Asha

This page lists the common classes of Java packages supported by both Android and Nokia Asha platforms. For a complete listing of Java ME packages, please refer to Javadocs.


Runnable Represents a command that can be executed.
Boolean The wrapper for the primitive type boolean.
Byte The wrapper for the primitive type byte.
Character The wrapper for the primitive type char.
Class The in-memory representation of a Java class.
Double The wrapper for the primitive type double.
Float The wrapper for the primitive type float.
Integer The wrapper for the primitive type int.
Long The wrapper for the primitive type long.
Math Provides basic math constants and operations such as trigonometric functions, hyperbolic functions, exponential, logarithms, etc.
Object The root class of the Java class hierarchy.
Runtime Allows Java applications to interface with the environment in which they are running.
Short The wrapper for the primitive type short.
String An immutable sequence of characters/code units (chars).
StringBuffer A modifiable sequence of characters for use in creating strings, where all accesses are synchronized.
System Provides access to system-related information and resources including standard input and output.
Thread A concurrent unit of execution.
Throwable The superclass of all classes which can be thrown by the VM.
ArithmeticException Thrown when an invalid arithmetic operation is attempted.
ArrayIndexOutOfBoundsException Thrown when an array is indexed with a value less than zero, or greater than or equal to the size of the array.
ArrayStoreException Thrown when a program attempts to store an element of an incompatible type in an array.
ClassCastException Thrown when a program attempts to cast a an object to a type with which it is not compatible.
ClassNotFoundException Thrown when a class loader is unable to find a class.
Exception The superclass of all classes that represent recoverable exceptions.
IllegalAccessException Thrown when a program attempts to access a field or method which is not accessible from the location where the reference is made.
IllegalArgumentException Thrown when a method is invoked with an argument which it can not reasonably deal with.
IllegalMonitorStateException Thrown when a monitor operation is attempted when the monitor is not in the correct state, for example, when a thread attempts to exit a monitor which it does not own.
IllegalStateException Thrown when an action is attempted at a time when the VM is not in the correct state.
IllegalThreadStateException Thrown when an operation is attempted which is not possible given the state that the executing thread is in.
IndexOutOfBoundsException Thrown when a program attempts to access a value in an indexable collection using a value which is outside of the range of valid indices.
InstantiationException Thrown when a program attempts to access a constructor which is not accessible from the location where the reference is made.
InterruptedException Thrown when a waiting thread is activated before the condition it was waiting for has been satisfied.
NegativeArraySizeException Thrown when an attempt is made to create an array with a size of less than zero.
NullPointerException Thrown when a program tries to access a field or method of an object or an element of an array when there is no instance or array to use, that is if the object or array points to null.
NumberFormatException Thrown when an invalid value is passed to a string-to-number conversion method.
RuntimeException The superclass of all classes that represent exceptional conditions which occur as a result of executing an application in the VM.
SecurityException Thrown when a security manager check fails.
StringIndexOutOfBoundsException Thrown when a string is indexed with a value less than zero, or greater than or equal to the size of the array.
UnsupportedOperationException Thrown when an unsupported operation is attempted.
Error The superclass of all classes that represent unrecoverable errors.
NoClassDefFoundError Thrown when the VM is unable to locate a class which it has been asked to load.
OutOfMemoryError Thrown when a request for memory is made that can not be satisfied using the available platform resources.
VirtualMachineError The superclass of all error classes that occur during the operation of the VM.


Reference Provides an abstract class which describes behaviour common to all reference objects.
WeakReference Implements a weak reference, which is the middle one of the three types of references.


Enumeration A legacy iteration interface.
Calendar An abstract base class for converting between a Date object and a set of integer fields such as YEAR, MONTH, DAY, HOUR, and so on.
Date Represents a specific moment in time, to the millisecond.
HashTable Maps keys to values.
Random Provides methods that return pseudo-random values.
Stack A Last-In/First-Out(LIFO) data structure which represents a stack of objects.
Timer Schedules one-shot or recurring tasks for execution.
TimerTask Represents a task to run at a specified time.
TimerZone Represents a time zone offset and also figures out daylight savings.
Vector An implementation of a growable array of objects.
EmptyStackException Thrown if the pop/peek method of a stack is executed on an empty stack.
NoSuchElementException Thrown when trying to retrieve an element past the end of an Enumeration or Iterator.


DataInput Defines an interface for classes that are able to read big-endian typed data from some source.
DataOutput Defines an interface for classes that are able to write big-endian typed data to some target.
ByteArrayInputStream A specialized InputStream for reading the contents of a byte array.
ByteArrayOutputStream A specialized OutputStream for class for writing content to an (internal) byte array.
DataInputStream Wraps an existing InputStream and reads big-endian typed data from it.
DataOutputStream Wraps an existing OutputStream and writes big-endian typed data to it.
InputStream A readable source of bytes.
InputStreamReader A class for turning a byte stream into a character stream.
OutputStream A writable sink for bytes.
OutputStreamWriter A class for turning a character stream into a byte stream.
PrintStream Wraps an existing OutputStream and provides convenience methods for writing common data types in a human readable format.
Reader The base class for all readers.
Writer The base class for all writers.
EOFException Thrown when a program encounters the end of a file or stream during an input operation.
InterruptedIOException Signals that a blocking I/O operation has been interrupted.
IOException Signals a general, I/O-related error.
UnsupportedEncodingException Thrown when a program asks for a particular character converter that is unavailable.
UTFDataFormatException Signals that an incorrectly encoded UTF-8 string has been encountered, most likely while reading some DataInputStream.


QName Represents a qualified name as defined in the XML specifications: XML Schema Part2: Datatypes specification, Namespaces in XML, Namespaces in XML Errata.


SaxParser Defines the API that wraps an XMLReader implementation class.
SAXParserFactory Defines a factory API that enables applications to configure and obtain a SAX based parser to parse XML documents.
ParserConfigurationException Indicates a serious configuration error.
FactoryConfigurationError Thrown when a problem with configuration with the Parser Factories exists.


Attributes Interface for a list of XML attributes.
Locator Interface for associating a SAX event with a document location.
InputSource A single input source for an XML entity.
SaxException Encapsulate a general SAX error or warning.
SAXNotRecognizedException Exception class for an unrecognized identifier.
SAXNotSupportedException Exception class for an unsupported operation.
SAXParseException Encapsulate an XML parse error or warning.


DefaultHandler Default base class for SAX2 event handlers.


Cipher Provides access to implementations of cryptographic ciphers for encryption and decryption.
BadPaddingException Thrown when a padding mechanism is expected for the input data, but the input data does not have the proper padding bytes.
IllegalBlockSizeException Thrown when the data length provided to a block cipher does not match the block size of the cipher.
NoSuchPaddingException Thrown when the requested padding mechanism is not supported.
ShortBufferException Thrown when the result of an operation is attempted to store in a user provided buffer that is too small.


IvParameterSpec The algorithm parameter specification for an initialization vector.
SecretKeySpec A key specification for a SecretKey and also a secret key implementation that is provider-independent.


Key The common interface for all keys.
PublicKey The common interface for public keys.
KeyFactory Used to convert key specifications (transparent representations of the underlying key material) into keys (opaque cryptographic keys of type Key).
MessageDigest Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
Signature An engine class which is capable of creating and verifying digital signatures, using different algorithms that have been registered with the Security class.
DigestException A general message digest exception.
GeneralSecurityException A general security exception and the superclass for all security specific exceptions.
InvalidAlgorithmParameterException Indicates the occurrence of invalid algorithm parameters.
InvalidKeyException Indicates exceptional conditions, caused by an invalid key.
KeyException The common superclass of all key related exceptions.
NoSuchAlgorithmException Indicates that a requested algorithm could not be found.
SignatureException A general Signature exception.


AlgorithmParameterSpec The marker interface for algorithm parameter specifications.
KeySpec The marker interface for key specifications.
EncodedKeySpec The abstract key specification for a public or a private key in encoded format.
X509EncodedKeySpec The key specification of an X.509 encoded key in ASN.1 format.
InvalidKeySpecException Thrown when an invalid key specification is encountered.
InvalidParameterSpecException Thrown when an invalid parameter specification is encountered.


Document Represents the entire HTML or XML document.
Element Represents an element in an HTML or XML document.
Node The primary datatype for the entire Document Object Model.
DOMException DOM operations only raise exceptions in "exceptional" circumstances, meaning when an operation is impossible to perform (either for logical reasons, because data is lost, or because the implementation has become unstable).

Last updated 8 July 2013

Back to top