Appendix A. CLDC Application Programming Interface

This appendix contains the application programming interface documentation in Almanac format for the CLDC. For a description of this format, refer to "Almanac Legend" on page 356.

Full CLDC javadocs with detailed comments are available in the CLDC Specification (see "Related Literature and Helpful Web Pages" on page xxv) or as part of the CLDC reference implementation software that can be downloaded from Sun's web site (http://www.sun.com/software/communitysource/j2me/cldc/).


Almanac Legend

The Almanac format presents all classes and interfaces in alphabetic order. Each class displays a list of its members in alphabetic order, mixing fields, methods, and constructors together.

The Almanac format used in this book is modeled after the style introduced by Patrick Chan in his excellent book, JavaTM Developers Almanac.

  1. The name of the class or interface. If the name refers to an interface, its name is printed in italics.

  2. The name of the package containing the class or interface.

  3. The inheritance chain of superclasses. A class is a subclass of the one above it. Inheritance hierarchies for interfaces are not displayed, because interfaces can potentially inherit multiple superinterfaces.

  4. The names of the interfaces implemented by the class to its left on the same line.

  5. Icons that indicate modifiers or members. If the "protected" symbol does not appear, the member is public. Private and package-private members have no symbols and are not shown.

    abstract

    • final

    static

    static final

    protected

    constructor

    field

  6. The return type of a method or the declared type of a field. It is blank for constructors.

  7. The name of the member. Members are sorted alphabetically. If it is a method, the parameter list and optional throws clause follows.


CLDC Almanac

ArithmeticException

java.lang

[View full width]
Object
      Throwable
         Exception
            RuntimeException
               ArithmeticException

                           ArithmeticException()
                           ArithmeticException(String s)

ArrayIndexOutOfBoundsException

java.lang

[View full width]
Object
      Throwable
          Exception
             RuntimeException
                IndexOutOfBoundsException
                    ArrayIndexOutOfBoundsException

                            ArrayIndexOutOfBoundsException()
                            ArrayIndexOutOfBoundsException(int index)
                            ArrayIndexOutOfBoundsException(String s)

ArrayStoreException

java.lang

[View full width]
Object
      Throwable
          Exception
             RuntimeException
                ArrayStoreException

                            ArrayStoreException()
                            ArrayStoreException(String s)

Boolean

java.lang

[View full width]
Object
      Boolean

                                Boolean(boolean value)
                       boolean booleanValue()
                       boolean equals(Object obj)
CLDC 1.1                Boolean FALSE
                           int hashCode()
                        String toString()
CLDC 1.1                Boolean TRUE

Byte

java.lang

[View full width]
Object
      Byte

                                Byte(byte value)
                          byte byteValue()
                       boolean equals(Object obj)
                           int hashCode()
                           byte MAX_VALUE
                           byte MIN_VALUE
                           byte parseByte(String s) throws NumberFormatException
                           byte parseByte(String s, int radix) throws NumberFormatException
                        String toString()

ByteArrayInputStream

java.io

[View full width]
Object
      InputStream
          ByteArrayInputStream

                          int available()
                        byte[] buf
                               ByteArrayInputStream(byte[] buf)
                               ByteArrayInputStream(byte[] buf, int offset, int length)
                         void close() throws IOException
                           int count
                           int mark
                         void mark(int readAheadLimit)
                      boolean markSupported()
                           int pos
                          int read()
                          int read(byte[] b, int off, int len)
                         void reset()
                         long skip(long n)

ByteArrayOutputStream

java.io

[View full width]
Object
      OutputStream
         ByteArrayOutputStream

                          byte[] buf
                                ByteArrayOutputStream()
                                ByteArrayOutputStream(int size)
                          void close() throws IOException
                            int count
                          void reset()
                           int size()
                        byte[] toByteArray()
                        String toString()
                          void write(byte[] b, int off, int len)
                          void write(int b)

Calendar

java.util

[View full width]
Object
      Calendar

                        boolean after(Object when)
                             int AM
                             int AM_PM
                             int APRIL
                             int AUGUST
                        boolean before(Object when)
                                  Calendar()
CLDC 1.1                    void computeFields()
CLDC 1.1                    void computeTime()
                             int DATE
                             int DAY_OF_MONTH
                             int DAY_OF_WEEK
                             int DECEMBER
                        boolean equals(Object obj)
                             int FEBRUARY
CLDC 1.1                   int[] fields
                             int FRIDAY
                            int get(int field)
                       Calendar getInstance()
                       Calendar getInstance(TimeZone zone)
                           Date getTime()
                           long getTimeInMillis()
                      TimeZone getTimeZone()
                            int HOUR
                            int HOUR_OF_DAY
CLDC 1.1              boolean[] isSet
                            int JANUARY
                            int JULY
                            int JUNE
                            int MARCH
                            int MAY
                            int MILLISECOND
                            int MINUTE
                            int MONDAY
                            int MONTH
                            int NOVEMBER
                            int OCTOBER
                            int PM
                            int SATURDAY
                            int SECOND
                            int SEPTEMBER
                          void set(int field, int value)
                          void setTime(Date date)
                           void setTimeInMillis(long millis)
                          void setTimeZone(TimeZone value)
                            int SUNDAY
                            int THURSDAY
CLDC 1.1                   long time
                            int TUESDAY
                            int WEDNESDAY
                            int YEAR

Character

java.lang

[View full width]
Object
      Character

                               Character(char value)
                          char charValue()
                           int digit(char ch, int radix)
                       boolean equals(Object obj)
                           int hashCode()
                       boolean isDigit(char ch)
                       boolean isLowerCase(char ch)
                       boolean isUpperCase(char ch)
                           int MAX_RADIX
                          char MAX_VALUE
                           int MIN_RADIX
                         char MIN_VALUE
                          char toLowerCase(char ch)
                            String toString()
                          char toUpperCase(char ch)

Class

java.lang

[View full width]
Object
      Class

                          Class forName(String className) throws ClassNotFoundException
                        String getName()
           java.io.InputStream getResourceAsStream(String name)
                       boolean isArray()
                       boolean isAssignableFrom(Class cls)
                       boolean isInstance(Object obj)
                       boolean isInterface()
                        Object newInstance() throws InstantiationException, IllegalAccessException
                        String toString()

ClassCastException

java.lang

[View full width]
Object
      Throwable
          Exception
             RuntimeException
                ClassCastException

                           ClassCastException()
                           ClassCastException(String s)

ClassNotFoundException

java.lang

[View full width]
Object
      Throwable
          Exception
             ClassNotFoundException

                           ClassNotFoundException()
                           ClassNotFoundException(String s)

Connection

javax.microedition.io

Connection

                     void close() throws java.io.IOException

ConnectionNotFoundException

javax.microedition.io

[View full width]
Object
      Throwable
          Exception
             java.io.IOException
                 ConnectionNotFoundException

                           ConnectionNotFoundException()
                           ConnectionNotFoundException(String s)

Connector

javax.microedition.io

[View full width]
Object
      Connector

                    Connection open(String name) throws java.io.IOException
                    Connection open(String name, int mode) throws java.io.IOException
                    Connection open(String name, int mode, boolean timeouts) throws java.io.IOException
       java.io.DataInputStream openDataInputStream(String name) throws java.io.IOException
      java.io.DataOutputStream openDataOutputStream(String name) throws java.io.IOException
           java.io.InputStream openInputStream(String name) throws java.io.IOException
          java.io.OutputStream openOutputStream(String name) throws java.io.IOException
                            int READ
                            int READ_WRITE
                            int WRITE

ContentConnection

javax.microedition.io

ContentConnection                         StreamConnection

                     String getEncoding()
                       long getLength()
                     String getType()

Datagram

javax.microedition.io

Datagram       java.io.DataInput, java.io.DataOutput

                   String getAddress()
                   byte[] getData()
                      int getLength()
                      int getOffset()
                     void reset()
                     void setAddress(Datagram reference)
                     void setAddress(String addr) throws java.io.IOException
                     void setData(byte[] buffer, int offset, int len)
                     void setLength(int len)

DatagramConnection

javax.microedition.io

DatagramConnection                       Connection

                       int getMaximumLength() throws java.io.IOException
                       int getNominalLength() throws java.io.IOException
                  Datagram newDatagram(byte[] buf, int size) throws java.io.IOException
                  Datagram newDatagram(byte[] buf, int size, String addr) throws java.io.IOException
                  Datagram newDatagram(int size) throws java.io.IOException
                  Datagram newDatagram(int size, String addr) throws java.io.IOException
                      void receive(Datagram dgram) throws java.io.IOException
                      void send(Datagram dgram) throws java.io.IOException

DataInput

java.io

DataInput

                       boolean readBoolean() throws IOException
                          byte readByte() throws IOException
                          char readChar() throws IOException
CLDC 1.1                double readDouble() throws IOException
CLDC 1.1                 float readFloat() throws IOException
                          void readFully(byte[] b) throws IOException
                          void readFully(byte[] b, int off, int len) throws IOException
                           int readInt() throws IOException
                          long readLong() throws IOException
                         short readShort() throws IOException
                           int readUnsignedByte() throws IOException
                           int readUnsignedShort() throws IOException
                        String readUTF() throws IOException
                           int skipBytes(int n) throws IOException

DataInputStream

java.io

[View full width]
Object
      InputStream
          DataInputStream                       DataInput

                         int available() throws IOException
                        void close() throws IOException
                                DataInputStream(InputStream in)
                   InputStream in
                         void mark(int readlimit)
                      boolean markSupported()
                           int read() throws IOException
                           int read(byte[] b) throws IOException
                           int read(byte[] b, int off, int len) throws IOException
                       boolean readBoolean() throws IOException
                          byte readByte() throws IOException
                          char readChar() throws IOException
CLDC 1.1                double readDouble() throws IOException
CLDC 1.1                 float readFloat() throws IOException
                          void readFully(byte[] b) throws IOException
                          void readFully(byte[] b, int off, int len) throws IOException
                           int readInt() throws IOException
                          long readLong() throws IOException
                         short readShort() throws IOException
                           int readUnsignedByte() throws IOException
                           int readUnsignedShort() throws IOException
                        String readUTF() throws IOException
                        String readUTF(DataInput in) throws IOException
                         void reset() throws IOException
                         long skip(long n) throws IOException
                          int skipBytes(int n) throws IOException

DataOutput

java.io

DataOutput

                          void write(byte[] b) throws IOException
                          void write(byte[] b, int off, int len) throws IOException
                          void write(int b) throws IOException
                          void writeBoolean(boolean v) throws IOException
                          void writeByte(int v) throws IOException
                          void writeChar(int v) throws IOException
                          void writeChars(String s) throws IOException
CLDC 1.1                  void writeDouble(double v) throws IOException
CLDC 1.1                  void writeFloat(float v) throws IOException
                          void writeInt(int v) throws IOException
                          void writeLong(long v) throws IOException
                          void writeShort(int v) throws IOException
                          void writeUTF(String s) throws IOException

DataOutputStream

java.io

[View full width]
Object
      OutputStream
         DataOutputStream                    DataOutput

                       void close() throws IOException
                             DataOutputStream(OutputStream out)
                       void flush() throws IOException
                 OutputStream out
                       void write(byte[] b, int off, int len) throws IOException
                       void write(int b) throws IOException
                        void writeBoolean(boolean v) throws IOException
                        void writeByte(int v) throws IOException
                        void writeChar(int v) throws IOException
                        void writeChars(String s) throws IOException
CLDC 1.1                void writeDouble(double v) throws IOException
CLDC 1.1                void writeFloat(float v) throws IOException
                        void writeInt(int v) throws IOException
                        void writeLong(long v) throws IOException
                        void writeShort(int v) throws IOException
                        void writeUTF(String str) throws IOException

Date

java.util

[View full width]
Object
      Date

                                Date()
                                Date(long date)
                       boolean equals(Object obj)
                          long getTime()
                           int hashCode()
                          void setTime(long time)
CLDC 1.1                String toString()

Double

java.lang

[View full width]
         Object
CLDC 1.1       Double

CLDC 1.1                  byte byteValue()
CLDC 1.1                        Double(double value)
CLDC 1.1                  long doubleToLongBits(double value)
CLDC 1.1                double doubleValue()
CLDC 1.1               boolean equals(Object obj)
CLDC 1.1                 float floatValue()
CLDC 1.1                   int hashCode()
CLDC 1.1                   int intValue()
CLDC 1.1               boolean isInfinite()
CLDC 1.1               boolean isInfinite(double v)
CLDC 1.1               boolean isNaN()
CLDC 1.1               boolean isNaN(double v)
CLDC 1.1                 double longBitsToDouble(long bits)
CLDC 1.1                  long longValue()
CLDC 1.1                 double MAX_VALUE
CLDC 1.1                 double MIN_VALUE
CLDC 1.1                 double NaN
CLDC 1.1                 double NEGATIVE_INFINITY
CLDC 1.1                 double parseDouble(String s) throws NumberFormatException
CLDC 1.1                 double POSITIVE_INFINITY
CLDC 1.1                 short shortValue()
CLDC 1.1                String toString()
CLDC 1.1                 String toString(double d)
CLDC 1.1                 Double valueOf(String s) throws NumberFormatException

EmptyStackException

java.util

[View full width]
Object
      Throwable
          Exception
             RuntimeException
                EmptyStackException

                            EmptyStackException()

Enumeration

java.util

Enumeration

                       boolean hasMoreElements()
                        Object nextElement()

EOFException

java.io

[View full width]
Object
      Throwable
          Exception
             IOException
                EOFException

                             EOFException()
                             EOFException(String s)

Error

java.lang

[View full width]
Object
      Throwable
          Error

                                Error()
                                Error(String s)

Exception

java.lang

[View full width]
Object
      Throwable
          Exception

                                Exception()
                                Exception(String s)

Float

java.lang

[View full width]
        Object
CLDC 1.1      Float

CLDC 1.1                  byte byteValue()
CLDC 1.1                double doubleValue()
CLDC 1.1               boolean equals(Object obj)
CLDC 1.1                        Float(double value)
CLDC 1.1                        Float(float value)
CLDC 1.1                    int floatToIntBits(float value)
CLDC 1.1                float floatValue()
CLDC 1.1                  int hashCode()
CLDC 1.1                  float intBitsToFloat(int bits)
CLDC 1.1                   int intValue()
CLDC 1.1               boolean isInfinite()
CLDC 1.1                 boolean isInfinite(float v)
CLDC 1.1              boolean isNaN()
CLDC 1.1                boolean isNaN(float v)
CLDC 1.1                 long longValue()
CLDC 1.1                  float MAX_VALUE
CLDC 1.1                   float MIN_VALUE
CLDC 1.1                   float NaN
CLDC 1.1                   float NEGATIVE_INFINITY
CLDC 1.1                   float parseFloat(String s) throws NumberFormatException
CLDC 1.1                   float POSITIVE_INFINITY
CLDC 1.1                 short shortValue()
CLDC 1.1                String toString()
CLDC 1.1                String toString(float f)
CLDC 1.1                  Float valueOf(String s) throws NumberFormatException

Hashtable

java.util

[View full width]
Object
      Hashtable

                          void clear()
                       boolean contains(Object value)
                       boolean containsKey(Object key)
                   Enumeration elements()
                        Object get(Object key)
                                Hashtable()
                                Hashtable(int initialCapacity)
                       boolean isEmpty()
                   Enumeration keys()
                        Object put(Object key, Object value)
                           void rehash()
                        Object remove(Object key)
                           int size()
                        String toString()

IllegalAccessException

java.lang

[View full width]
Object
      Throwable
          Exception
             IllegalAccessException

                               IllegalAccessException()
                               IllegalAccessException(String s)

IllegalArgumentException

java.lang

[View full width]
Object
      Throwable
          Exception
             RuntimeException
                IllegalArgumentException

                            IllegalArgumentException()
                            IllegalArgumentException(String s)

IllegalMonitorStateException

java.lang

[View full width]
Object
      Throwable
          Exception
             RuntimeException
                IllegalMonitorStateException

                             IllegalMonitorStateException()
                             IllegalMonitorStateException(String s)

IllegalThreadStateException

java.lang

[View full width]
Object
      Throwable
          Exception
             RuntimeException
                IllegalArgumentException
                     IllegalThreadStateException

                             IllegalThreadStateException()
                             IllegalThreadStateException(String s)

IndexOutOfBoundsException

java.lang

[View full width]
Object
      Throwable
          Exception
             RuntimeException
                 IndexOutOfBoundsException

                            IndexOutOfBoundsException()
                            IndexOutOfBoundsException(String s)

InputConnection

javax.microedition.io

InputConnection                                Connection

        java.io.DataInputStream openDataInputStream() throws java.io.IOException
            java.io.InputStream openInputStream() throws java.io.IOException

InputStream

java.io

[View full width]
Object
      InputStream

                           int available() throws IOException
                          void close() throws IOException
                                InputStream()
                          void mark(int readlimit)
                       boolean markSupported()
                           int read() throws IOException
                           int read(byte[] b) throws IOException
                           int read(byte[] b, int off, int len) throws IOException
                          void reset() throws IOException
                          long skip(long n) throws IOException

InputStreamReader

java.io

[View full width]
Object
      Reader
         InputStreamReader

                          void close() throws IOException
                               InputStreamReader(InputStream is)
                               InputStreamReader(InputStream is, String enc) throws UnsupportedEncodingException
                          void mark(int readAheadLimit) throws IOException
                       boolean markSupported()
                           int read() throws IOException
                           int read(char[] cbuf, int off, int len) throws IOException
                       boolean ready() throws IOException
                          void reset() throws IOException
                          long skip(long n) throws IOException

InstantiationException

java.lang

[View full width]
Object
      Throwable
          Exception
             InstantiationException

                                InstantiationException()
                                InstantiationException(String s)

Integer

java.lang

[View full width]
Object
      Integer

                          byte byteValue()
CLDC 1.1                double doubleValue()
                       boolean equals(Object obj)
CLDC 1.1                 float floatValue()
                           int hashCode()
                               Integer(int value)
                           int intValue()
                          long longValue()
                            int MAX_VALUE
                            int MIN_VALUE
                            int parseInt(String s) throws NumberFormatException
                            int parseInt(String s, int radix) throws NumberFormatException
                          short shortValue()
                         String toBinaryString(int i)
                         String toHexString(int i)
                         String toOctalString(int i)
                         String toString()
                         String toString(int i)
                         String toString(int i, int radix)
                        Integer valueOf(String s) throws NumberFormatException
                        Integer valueOf(String s, int radix) throws NumberFormatException

InterruptedException

java.lang

[View full width]
Object
      Throwable
          Exception
             InterruptedException

                               InterruptedException()
                               InterruptedException(String s)

InterruptedIOException

java.io

[View full width]
Object
      Throwable
          Exception
             IOException
                InterruptedIOException

                           int bytesTransferred
                               InterruptedIOException()
                               InterruptedIOException(String s)

IOException

java.io

[View full width]
Object
      Throwable
          Exception
             IOException

                                IOException()
                                IOException(String s)

Long

java.lang

[View full width]
Object
      Long

CLDC 1.1                double doubleValue()
                       boolean equals(Object obj)
CLDC 1.1                 float floatValue()
                           int hashCode()
                                Long(long value)
                          long longValue()
                           long MAX_VALUE
                           long MIN_VALUE
                          long parseLong(String s) throws NumberFormatException
                          long parseLong(String s, int radix) throws NumberFormatException
                        String toString()
                        String toString(long i)
                        String toString(long i, int radix)

Math

java.lang

[View full width]
Object
      Math

CLDC 1.1                 double abs(double a)
CLDC 1.1                  float abs(float a)
                            int abs(int a)
                           long abs(long a)
CLDC 1.1                 double ceil(double a)
CLDC 1.1                 double cos(double a)
CLDC 1.1                 double E
CLDC 1.1                 double floor(double a)
CLDC 1.1                 double max(double a, double b)
CLDC 1.1                  float max(float a, float b)
                            int max(int a, int b)
                           long max(long a, long b)
CLDC 1.1                 double min(double a, double b)
CLDC 1.1                  float min(float a, float b)
                            int min(int a, int b)
                           long min(long a, long b)
CLDC 1.1                 double PI
CLDC 1.1                 double sin(double a)
CLDC 1.1                 double sqrt(double a)
CLDC 1.1                 double tan(double a)
CLDC 1.1                 double toDegrees(double angrad)
CLDC 1.1                 double toRadians(double angdeg)

NegativeArraySizeException

java.lang

[View full width]
Object
      Throwable
          Exception
             RuntimeException
                 NegativeArraySizeException

                               NegativeArraySizeException()
                               NegativeArraySizeException(String s)

NoClassDefFoundError

java.lang

[View full width]
Object
      Throwable
          Error
CLDC 1.1      NoClassDefFoundError

CLDC 1.1                      NoClassDefFoundError()
CLDC 1.1                      NoClassDefFoundError(String s)

NoSuchElementException

java.util

[View full width]
Object
      Throwable
          Exception
             RuntimeException
                NoSuchElementException

                           NoSuchElementException()
                           NoSuchElementException(String s)

NullPointerException

java.lang

[View full width]
Object
      Throwable
          Exception
             RuntimeException
                NullPointerException

                              NullPointerException()
                              NullPointerException(String s)

NumberFormatException

java.lang

[View full width]
Object
      Throwable
          Exception
             RuntimeException
                IllegalArgumentException
                     NumberFormatException

                             NumberFormatException()
                             NumberFormatException(String s)

Object

java.lang

Object

                        boolean equals(Object obj)
                          Class getClass()
                            int hashCode()
                            void notify()
                            void notifyAll()
                                 Object()
                         String toString()
                            void wait() throws InterruptedException
                            void wait(long timeout) throws InterruptedException
                            void wait(long timeout, int nanos) throws InterruptedException

OutOfMemoryError

java.lang

[View full width]
Object
      Throwable
          Error
              VirtualMachineError
                   OutOfMemoryError

                             OutOfMemoryError()
                             OutOfMemoryError(String s)

OutputConnection

javax.microedition.io

OutputConnection                               Connection

         java.io.DataOutputStream openDataOutputStream() throws java.io.IOException
             java.io.OutputStream openOutputStream() throws java.io.IOException

OutputStream

java.io

[View full width]
Object
      OutputStream

                          void close() throws IOException
                          void flush() throws IOException
                                OutputStream()
                          void write(byte[] b) throws IOException
                          void write(byte[] b, int off, int len) throws IOException
                          void write(int b) throws IOException

OutputStreamWriter

java.io

[View full width]
Object
      Writer
          OutputStreamWriter

                          void close() throws IOException
                          void flush() throws IOException
                                OutputStreamWriter(OutputStream os)
                                OutputStreamWriter(OutputStream os, String enc) throws UnsupportedEncodingException
                          void write(char[] cbuf, int off, int len) throws IOException
                          void write(int c) throws IOException
                          void write(String str, int off, int len) throws IOException

PrintStream

java.io

[View full width]
Object
      OutputStream
         PrintStream

                       boolean checkError()
                          void close()
                          void flush()
                          void print(boolean b)
                          void print(char c)
                          void print(char[] s)
CLDC 1.1                  void print(double d)
CLDC 1.1                  void print(float f)
                          void print(int i)
                          void print(long l)
                          void print(Object obj)
                          void print(String s)
                          void println()
                          void println(boolean x)
                          void println(char x)
                          void println(char[] x)
CLDC 1.1                  void println(double x)
CLDC 1.1                  void println(float x)
                          void println(int x)
                          void println(long x)
                          void println(Object x)
                          void println(String x)
                                PrintStream(OutputStream out)
                           void setError()
                          void write(byte[] buf, int off, int len)
                          void write(int b)

Random

java.util

[View full width]
Object
      Random

                            int next(int bits)
CLDC 1.1                double nextDouble()
CLDC 1.1                 float nextFloat()
                           int nextInt()
CLDC 1.1                   int nextInt(int n)
                          long nextLong()
                                Random()
                                Random(long seed)
                          void setSeed(long seed)

Reader

java.io

[View full width]
Object
      Reader

                           void close() throws IOException
                          Object lock
                          void mark(int readAheadLimit) throws IOException
                       boolean markSupported()
                           int read() throws IOException
                           int read(char[] cbuf) throws IOException
                           int read(char[] cbuf, int off, int len) throws IOException
                                 Reader()
                                 Reader(Object lock)
                       boolean ready() throws IOException
                          void reset() throws IOException
                          long skip(long n) throws IOException

Reference

java.lang.ref

[View full width]
        Object
CLDC 1.1      Reference

CLDC 1.1                  void clear()
CLDC 1.1                Object get()

Runnable

java.lang

Runnable

                          void run()

Runtime

java.lang

[View full width]
Object
      Runtime

                          void exit(int status)
                          long freeMemory()
                          void gc()
                       Runtime getRuntime()
                          long totalMemory()

RuntimeException

java.lang

[View full width]
Object
      Throwable
          Exception
             RuntimeException

                            RuntimeException()
                            RuntimeException(String s)

SecurityException

java.lang

[View full width]
Object
      Throwable
          Exception
             RuntimeException
                SecurityException

                            SecurityException()
                            SecurityException(String s)

Short

java.lang

[View full width]
Object
      Short

                        boolean equals(Object obj)
                            int hashCode()
                           short MAX_VALUE
                           short MIN_VALUE
                           short parseShort(String s) throws NumberFormatException
                           short parseShort(String s, int radix) throws NumberFormatException
                                 Short(short value)
                          short shortValue()
                         String toString()

Stack

java.util

[View full width]
Object
      Vector
         Stack

                       boolean empty()
                        Object peek()
                        Object pop()
                        Object push(Object item)
                           int search(Object o)
                                Stack()

StreamConnection

javax.microedition.io

StreamConnection InputConnection, OutputConnection

StreamConnectionNotifier

javax.microedition.io

StreamConnectionNotifier                       Connection

              StreamConnection acceptAndOpen() throws java.io.IOException

String

java.lang

[View full width]
Object
      String

                          char charAt(int index)
                           int compareTo(String anotherString)
                        String concat(String str)
                       boolean endsWith(String suffix)
                       boolean equals(Object anObject)
CLDC 1.1               boolean equalsIgnoreCase(String anotherString)
                        byte[] getBytes()
                        byte[] getBytes(String enc) throws java.io.UnsupportedEncodingException
                          void getChars(int srcBegin, int srcEnd, char[] dst, int dstBegin)
                           int hashCode()
                           int indexOf(int ch)
                           int indexOf(int ch, int fromIndex)
                           int indexOf(String str)
                           int indexOf(String str, int fromIndex)
CLDC 1.1                String intern()
                           int lastIndexOf(int ch)
                           int lastIndexOf(int ch, int fromIndex)
                           int length()
                       boolean regionMatches(boolean ignoreCase, int toffset, String other, int ooffset, int len)
                        String replace(char oldChar, char newChar)
                       boolean startsWith(String prefix)
                       boolean startsWith(String prefix, int toffset)
                                String()
                                String(byte[] bytes)
                                String(byte[] bytes, int off, int len)
                                String(byte[] bytes, int off, int len, String enc) throws java.io.UnsupportedEncodingException
                                String(byte[] bytes, String enc) throws java.io.UnsupportedEncodingException
                                String(char[] value)
                                String(char[] value, int offset, int count)
                                String(String value)
                                String(StringBuffer buffer)
                        String substring(int beginIndex)
                        String substring(int beginIndex, int endIndex)
                        char[] toCharArray()
                        String toLowerCase()
                        String toString()
                        String toUpperCase()
                        String trim()
                         String valueOf(boolean b)
                         String valueOf(char c)
                         String valueOf(char[] data)
                         String valueOf(char[] data, int offset, int count)
CLDC 1.1                 String valueOf(double d)
CLDC 1.1                 String valueOf(float f)
                         String valueOf(int i)
                         String valueOf(long l)
                         String valueOf(Object obj)

StringBuffer

java.lang

[View full width]
Object
      StringBuffer

                  StringBuffer append(boolean b)
                  StringBuffer append(char c)
                  StringBuffer append(char[] str)
                  StringBuffer append(char[] str, int offset, int len)
CLDC 1.1          StringBuffer append(double d)
CLDC 1.1          StringBuffer append(float f)
                  StringBuffer append(int i)
                  StringBuffer append(long l)
                  StringBuffer append(Object obj)
                  StringBuffer append(String str)
                           int capacity()
                          char charAt(int index)
                  StringBuffer delete(int start, int end)
                  StringBuffer deleteCharAt(int index)
                          void ensureCapacity(int minimumCapacity)
                          void getChars(int srcBegin, int srcEnd, char[] dst, int dstBegin)
                  StringBuffer insert(int offset, boolean b)
                  StringBuffer insert(int offset, char c)
                  StringBuffer insert(int offset, char[] str)
CLDC 1.1          StringBuffer insert(int offset, double d)
CLDC 1.1          StringBuffer insert(int offset, float f)
                  StringBuffer insert(int offset, int i)
                  StringBuffer insert(int offset, long l)
                  StringBuffer insert(int offset, Object obj)
                  StringBuffer insert(int offset, String str)
                           int length()
                  StringBuffer reverse()
                          void setCharAt(int index, char ch)
                          void setLength(int newLength)
                                StringBuffer()
                                StringBuffer(int length)
                                StringBuffer(String str)
                        String toString()

StringIndexOutOfBoundsException

java.lang

[View full width]
Object
      Throwable
          Exception
             RuntimeException
                IndexOutOfBoundsException
                    StringIndexOutOfBoundsException

                               StringIndexOutOfBoundsException()
                               StringIndexOutOfBoundsException(int index)
                               StringIndexOutOfBoundsException(String s)

System

java.lang

[View full width]
Object
      System

                           void arraycopy(Object src, int srcOffset, Object dst, int dstOffset, int length)
                           long currentTimeMillis()
            java.io.PrintStream err
                           void exit(int status)
                           void gc()
                         String getProperty(String key)
                            int identityHashCode(Object x)
            java.io.PrintStream out

Thread

java.lang

[View full width]
Object
      Thread                                 Runnable

                            int activeCount()
                         Thread currentThread()
CLDC 1.1                 String getName()
                            int getPriority()
CLDC 1.1                  void interrupt()
                        boolean isAlive()
                           void join() throws InterruptedException
                             int MAX_PRIORITY
                             int MIN_PRIORITY
                             int NORM_PRIORITY
                           void run()
                          void setPriority(int newPriority)
                          void sleep(long millis) throws InterruptedException
                           void start()
                                 Thread()
                                 Thread(Runnable target)
CLDC 1.1                         Thread(Runnable target, String name)
CLDC 1.1                         Thread(String name)
                         String toString()
                            void yield()

Throwable

java.lang

[View full width]
Object
      Throwable

                        String getMessage()
                          void printStackTrace()
                               Throwable()
                               Throwable(String message)
                        String toString()

TimeZone

java.util

[View full width]
Object
      TimeZone

                       String[] getAvailableIDs()
                       TimeZone getDefault()
                        String getID()
                            int getOffset(int era, int year, int month, int day, int dayOfWeek, int millis)
                            int getRawOffset()
                       TimeZone getTimeZone(String ID)
                                TimeZone()
                        boolean useDaylightTime()

UnsupportedEncodingException

java.io

[View full width]
Object
      Throwable
          Exception
             IOException
                UnsupportedEncodingException

                           UnsupportedEncodingException()
                           UnsupportedEncodingException(String s)

UTFDataFormatException

java.io

[View full width]
Object
      Throwable
          Exception
             IOException
                UTFDataFormatException

                          UTFDataFormatException()
                          UTFDataFormatException(String s)

Vector

java.util

[View full width]
Object
      Vector

                          void addElement(Object obj)
                           int capacity()
                             int capacityIncrement
                       boolean contains(Object elem)
                          void copyInto(Object anArray)
                        Object elementAt(int index)
                             int elementCount
                         Object[] elementData
                   Enumeration elements()
                          void ensureCapacity(int minCapacity)
                        Object firstElement()
                           int indexOf(Object elem)
                           int indexOf(Object elem, int index)
                          void insertElementAt(Object obj, int index)
                       boolean isEmpty()
                        Object lastElement()
                           int lastIndexOf(Object elem)
                           int lastIndexOf(Object elem, int index)
                          void removeAllElements()
                       boolean removeElement(Object obj)
                          void removeElementAt(int index)
                          void setElementAt(Object obj, int index)
                          void setSize(int newSize)
                           int size()
                        String toString()
                          void trimToSize()
                                Vector()
                                Vector(int initialCapacity)
                                Vector(int initialCapacity, int capacityIncrement)

VirtualMachineError

java.lang

[View full width]
Object
      Throwable
          Error
              VirtualMachineError

                                VirtualMachineError()
                                VirtualMachineError(String s)

WeakReference

java.lang.ref

[View full width]
    Object
          Reference
CLDC 1.1     WeakReference

CLDC 1.1                        WeakReference(Object ref)

Writer

java.io

[View full width]
Object
      Writer

                          void close() throws IOException
                          void flush() throws IOException
                        Object lock
                          void write(char[] cbuf) throws IOException
                          void write(char[] cbuf, int off, int len) throws IOException
                          void write(int c) throws IOException
                          void write(String str) throws IOException
                          void write(String str, int off, int len) throws IOException
                                 Writer()
                                 Writer(Object lock)


Appendix B. MIDP Application Programming Interface

This appendix contains the application programming interface documentation in Almanac format for the MIDP. For a description of this format, refer to "Almanac Legend" on page 356.

Full MIDP javadocs with detailed comments are available in the MIDP Specification (see "Related Literature and Helpful Web Pages" on page xxv) or as part of the MIDP reference implementation software that can be downloaded from Sun's web site (http://www.sun.com/software/communitysource/j2me/midp/).