FazBrowse Wikipedia Viewer | Main Page |
Search Wikipedia:
|
Viewing: https://en.wikipedia.org/wiki/Java_SE

Java Platform, Standard Edition

Contents
        Streams
        Random access
    java.nio
    java.math
Special purpose packages
    java.applet
    java.beans
    java.awt
    java.rmi
    java.security
org.omg
    org.omg.CORBA

"},"editor":{"wt":"<!--editor software for the platform-->"},"runtime":{"wt":"[[Java (software platform)|Java]]"},"format":{"wt":"<!--major file formats on the platform-->"},"language":{"wt":"[[Java (programming language)|Java]]"},"application":{"wt":"[[Embedded system]]s, [[mobile device]]s"},"status":{"wt":"Active"},"license":{"wt":"Proprietary licence by Oracle"},"website":{"wt":"{{URL|https://www.oracle.com/java/technologies/java-se-glance.html}}"}},"i":0}}]}'>
Java Platform, Standard Edition
Player softwareJava
Programming language(s)Java
Application(s)Embedded systems, mobile devices
StatusActive
LicenseProprietary licence by Oracle
Websitewww.oracle.com/java/technologies/java-se-glance.html
Java platform editions
java.lang.Object – the class that is the root of every class hierarchy.
  • java.lang.Throwable – the class that is the base class of the exception class hierarchy.
  • java.lang.RuntimeException – the base classes for each exception type.
  • java.lang.StringBuffer and java.lang.Iterable – the interface that allows iteration using for-each loop
  • java.lang.Runtime, java.lang.Math and java.lang.ref.SoftReference can be used to implement a cache. An object that is not reachable by a strong reference (that is, not strongly reachable), but is referenced by a soft reference is called "softly reachable". A softly reachable object may be garbage collected at the discretion of the garbage collector. This generally means that softly reachable objects are only garbage collected when free memory is low—but again, this is at the garbage collector's discretion. Semantically, a soft reference means, "Keep this object when nothing else references it, unless the memory is needed."
  • A java.lang.ref.PhantomReference is used to reference objects that have been marked for garbage collection and have been finalized, but have not yet been reclaimed. An object that is not strongly, softly or weakly reachable, but is referenced by a phantom reference is called "phantom reachable." This allows for more flexible cleanup than is possible with the finalization mechanism alone. Semantically, a phantom reference means "this object is no longer needed and has been finalized in preparation for being collected."
  • Each of these reference types extends the clear() method to clear the reference.

    The java.lang.ref also defines the class java.lang.Package accommodate applications such as debuggers, interpreters, object inspectors, class browsers, and services such as object serialization and JavaBeans that need access to either the public members of a target object (based on its runtime class) or the members declared by a given class. This package was added in JDK 1.1.

    Reflection is used to instantiate classes and invoke methods using their names, a concept that allows for dynamic programming. Classes, interfaces, methods, fields, and constructors can all be discovered and used at runtime. Reflection is supported by metadata that the JVM has about the program.

    Techniques
    edit

    There are basic techniques involved in reflection:

    • Discovery – this involves taking an object or class and discovering the members, superclasses, implemented interfaces, and then possibly using the discovered elements.
    • Use by name – involves starting with the symbolic name of an element and using the named element.
    Discovery
    edit

    Discovery typically starts with an object and calling the java.lang.reflect.Method objects representing all the public methods of the class or interface

  • getFields() – returns an array of getSuperclass() – returns the java.lang.Class<? super T> object representing the superclass of the class or interface (null is returned for interfaces)
  • getMethod(String name, Class<?>... parameterTypes) – returns the java.lang.reflect.Method object representing the public method with the name name of the class or interface that accepts the parameters specified by the java.lang.Class<?>... parameters.
  • ... parameterTypes)"},"1":{"wt":"java/lang"},"2":{"wt":"Class"},"3":{"wt":"getConstructor(java.lang.Class...)"}},"i":0}}]}'>getConstructor(Class<?>... parameterTypes) – returns the java.lang.reflect.Constructor<T> object representing the public constructor of the class that accepts the parameters specified by the java.lang.Class<?>... parameters.
  • Method.invoke(Object obj, Object... args) – returns an java.lang.Object containing the result of invoking the method for the instance of the first java.lang.Object parameter passed to invoke(). The remaining java.lang.Object... parameters are passed to the method. (If the java.lang.reflect.Method object represents a static method then the first java.lang.Object parameter is ignored and may be null.)
  • java.lang.reflect.Array class that contains static methods for creating and manipulating array objects, and since J2SE 1.3, a java.io.InputStream and java.io.Writer are abstract base classes for reading from and writing to character streams, respectively. The package also has a few miscellaneous classes to support interactions with the host file system.

    Streams

    edit

    The stream classes follow the decorator pattern by extending the base subclass to add features to the stream classes. Subclasses of the base stream classes are typically named for one of the following attributes:

    • the source/destination of the stream data
    • the type of data written to/read from the stream
    • additional processing or filtering performed on the stream data

    The stream subclasses are named using the naming pattern XxxStreamType where Xxx is the name describing the feature and StreamType is one of java.io.InputStream, java.io.OutputStream, java.io.Reader, or java.io.Writer.

    The following table shows the sources/destinations supported directly by the java.io package:

    Source/DestinationNameStream typesIn/outClasses
    byte[]ByteArraybytein, out CharArraycharin, out Filebyte, charin, out java.io.FileReader, java.io.StringReader, java.io.PipedInputStream, java.io.PipedWriter

    Other standard library packages provide stream implementations for other destinations, such as the java.io.InputStream returned by the java.io.FilterInputStream, java.io.FilterWriter.

    The java.io.Reader and java.io.Writer classes are really just byte streams with additional processing performed on the data stream to convert the bytes to characters. They use the default character encoding for the platform, which as of J2SE 5.0 is represented by the java.io.InputStreamReader class converts an InputStream to a java.io.Reader and the java.io.BufferedInputStream, java.io.BufferedWriter

  • "push back" last value readjava.io.PushbackReader
    read/write primitive typesjava.io.DataOutputStream
    object serialization (read/write objects)java.io.ObjectOutputStream

    Random access

    edit

    The skipBytes(int) methods. The current position of the file pointer is returned by the java.io.FileDescriptor class is a file descriptor that represents a source or sink (destination) of bytes. Typically this is a file, but can also be a console or network socket. java.io.FileDescriptor objects are used to create java.io.File streams. They are obtained from java.io.File streams and java.net sockets and datagram sockets.

    java.nio

    edit

    In J2SE 1.4, the package java.nio.channels provides support for channels, which represent connections to entities that are capable of performing I/O operations, such as files and sockets. The java.nio.channels package also provides support for fine-grained locking of files.

    java.math

    edit

    The java.math.BigInteger – provides arbitrary-precision integers. Operations on java.math.BigInteger do not overflow or lose precision. In addition to standard arithmetic operations, it provides modular arithmetic, GCD calculation, primality testing, prime number generation, bit manipulation, and other miscellaneous operations.

  • java.net package provides special IO routines for networks, as well as other common transactions. java.util package. Included in the package is the Collections API, an organized data structure hierarchy influenced heavily by the design patterns considerations.

    Special purpose packages

    edit

    java.applet

    edit
    java.applet package lets applications be downloaded over a network and run within a guarded sandbox. Security restrictions are easily imposed on the sandbox. A developer, for example, may apply a digital signature to an applet, thereby labeling it as safe. Doing so allows the user to grant the applet permission to perform restricted operations (such as accessing the local hard drive), and removes some or all the sandbox restrictions. Digital certificates are issued by certificate authorities.

    Because Java applets are now deprecated, this package is itself deprecated.

    java.beans

    edit
    java.beans package are various classes for developing and manipulating beans, reusable components defined by the JavaBeans architecture. The architecture provides mechanisms for manipulating properties of components and firing events when those properties change.

    The APIs in java.beans are intended for use by a bean editing tool, in which beans can be combined, customized, and manipulated. One type of bean editor is a GUI designer in an integrated development environment.

    java.awt

    edit
    java.awt, or Abstract Window Toolkit, provides access to a basic set of GUI widgets based on the underlying native platform's widget set, the core of the GUI event subsystem, and the interface between the native windowing system and the Java application. It also provides several basic layout managers, a datatransfer package for use with the Clipboard and Drag and Drop, the interface to input devices such as mice and keyboards, as well as access to the system tray on supporting systems. This package, along with javax.swing contains the largest number of enums (7 in all) in JDK 6.

    java.rmi

    edit
    java.rmi package provides Java remote method invocation to support remote procedure calls between two java applications running in different JVMs.

    java.security

    edit

    Support for security, including the message digest algorithm, is included in the

    An implementation of the JDBC API (used to access SQL databases) is grouped into the

    The

    Swing is a collection of routines that build on java.awt to provide a platform independent widget toolkit. org.xml.sax packages provide interfaces for the Simple API for XML (SAX).

    org.omg

    edit

    org.omg.CORBA

    edit
  • ↑ "Java SE Overview". Oracle Corporation. Retrieved February 26, 2017.
  • ↑ "Java Platform, Standard Edition 8 Reference Implementations". Archived from the original on November 21, 2015.
  • ↑ Darlene Storm (September 25, 2012). "Another critical Java vulnerability puts 1 billion users at risk". Computerworld Security Blog. Archived from the original on January 13, 2013. Retrieved January 11, 2013.
  • ↑ Czech Republic

  • View original on Wikipedia | Back | FazBrowse Home