CLDC 8

CLDC 8 Specification Changes

This update to the specification includes Java Runtime Library changes, Virtual Machine Specification updates, and Generic Connection Framework changes.

CLDC 8 Library Changes

This update of the CLDC specification includes updated and additional classes and interfaces from Java SE 8.

Package java.io

Enhancements and alignment for system input and output through data streams and the file system. Added the Closeable interface, BufferedReader, BufferedWriter, FilePermission, InputStreamReader, and OutputStreamWriter. Stream-based classes now implement the Closeable interface.

Package java.lang

Enhancements and alignment to support the extensions in the java.io package and the extended collection classes in java.util.

Generic type parameters have been added to the signatures of various classes and methods, including Class, for example, <T>. New interfaces include Appendable, AutoCloseable, CharSequence, Cloneable, Comparable, and Iterable.

Added classes: Enum to support the enum language feature, plus Number and StringBuilder to support automatic conversion from primitives to value types and efficient string construction needed by the compiler.

Enhanced exceptions and improved error reporting via CloneNotSupportedException, IllegalAccessException, AssertionError, ClassFormatError, IncompatibleClassChangeError, LinkageError, NoSuchFieldError, and UnsupportedClassVersionError.

Package java.lang.annotation

New package which provides library support for the Java programming language annotation facility. This includes the annotation interface Annotation, enumerations for ElementType and RetentionPolicy. It also includes the following Annotation types: Documented, Inherited, Retention, and Target. Annotations with retention CLASS are supported at compile time but are not retained or accessible at runtime.

Package java.lang.ref

Newly added class ReferenceQueue to support a limited degree of interaction with the garbage collector. The package consists of the following classes: Reference and WeakReference and ReferenceQueue,

Package java.net

Subset of the JAVA SE networking package that contains a set of exceptions, which indicate details on problems with socket-based network connections: BindException, ConnectException, NoRouteToHostException, PortUnreachableException, SocketException, and UnknownHostException

Package java.nio

New package which defines buffers, that are containers for data.

The NIO Buffer API subset consists of portions of the Buffer, ByteBuffer, ByteOrder, FloatBuffer, IntBuffer and ShortBuffer classes as well as the support classes BufferOverflowException and BufferUnderflowException.

Package java.nio.channels

Defines channels, which represent connections to entities that are capable of performing I/O operations, such as files. It defines the interfaces ByteChannel, Channel, ReadableByteChannel, SeekableByteChannel, WritableByteChannel and the class FileChannel as well as the ClosedChannelException.

Package java.nio.file

New package which defines interfaces and classes for the Java Virtual Machine to access files, file attributes, and file systems. It contains the interfaces CopyOption, DirectoryStream, DirectoryStream.Filter, OpenOption, Path and the classes Files, FileStore, FileSystem, FileSystems, Paths. Additionally it defines the enums LinkOption StandardCopyOption StandardOpenOption and the exceptions AtomicMoveNotSupportedException, ClosedFileSystemException, DirectoryIteratorException, DirectoryNotEmptyException, FileAlreadyExistsException, FileSystemException, InvalidPathException, NoSuchFileException, NotDirectoryException, ReadOnlyFileSystemException.

Package java.nio.file.attribute

Interfaces and classes providing access to file and file system attributes. It defines the interfaces BasicFileAttributes, FileAttribute and the class FileTime.

Package java.util

An enhanced subset of the Java SE collection classes and other utility classes have been added. The following interfaces were added: Collection, Comparator, Deque, Enumeration, EventListener, Iterator, List, ListIterator, Map, Map.Entry, Queue, RandomAccess and Set.

The following classes were added to : AbstractCollection, AbstractList, AbstractMap, AbstractQueue, AbstractSequentialList, AbstractSet, ArrayDeque, ArrayList, Arrays, Calendar, Collections, EventObject, Formatter, HashMap, HashSet, Hashtable, LinkedHashMap, LinkedHashSet, LinkedList, Objects, Properties, ServiceLoader, Stack, StringTokenizer, Vector, and WeakHashMap.

New exceptions are ConcurrentModificationException and ServiceConfigurationError.

Package java.util.logging

New Package that provides the classes and interfaces of the CLDC platform's core logging facilities. It defines the Filter interface and the classes ConsoleHandler, Formatter, Handler, Level, Logger, LoggingPermission, LogManager, LogRecord, SimpleFormatter, and StreamHandler.

CLDC 8 Virtual Machine Changes

The Virtual Machine specification has been updated with features from The Java® Virtual Machine Specification, Java SE 8 Edition as specified in [Java SE8].

Verification by Type Checking is supported to directly leverage class files produced by Java SE 8 tools in class file versions 51.* and 52.*.

The CLDC 1.0 Verification Byte Code Typechecker is optional and is used to provide backward compatibility where needed for class file versions less than or equal to 48.0.

A number of detailed behaviors of the VM have been clarified for consistency with The Java® Virtual Machine Specification, Java SE 8 Edition specifications.

Generic Connection Framework Changes

The Generic Connection Framework has been moved to a separate specification including the packages javax.microedition.io and javax.microedition.pki.

CLDC 8

Copyright (c) 2014, Oracle and/or its affiliates. All Rights Reserved. Use of this specification is subject to license terms.