### List Available Configurations and Start Recording Source: https://devdocs.io/openjdk/jdk.jfr/jdk/jfr/configuration This example demonstrates how to list all available JFR configurations and how to start a recording using a specified configuration. It handles both listing and starting scenarios based on command-line arguments. ```java public static void main(String... args) throws Exception { if (args.length == 0) { System.out.println("Configurations:"); for (Configuration c : Configuration.getConfigurations()) { System.out.println("Name: " + c.getName()); System.out.println("Label: " + c.getLabel()); System.out.println("Description: " + c.getDescription()); System.out.println("Provider: " + c.getProvider()); System.out.println(); } } else { String name = args[0]; Configuration c = Configuration.getConfiguration(name); try (Recording r = new Recording(c)) { System.out.println("Starting recording with settings:"); for (Map.Entry setting : c.getSettings().entrySet()) { System.out.println(setting.getKey() + " = " + setting.getValue()); } r.start(); } } } ``` -------------------------------- ### start() Source: https://devdocs.io/openjdk~25/java.base/java/lang/processbuilder Starts a new process based on the configuration of this ProcessBuilder. This method handles command execution, environment setup, and working directory. ```APIDOC ## start() ### Description Starts a new process using the attributes defined in this process builder. The subprocess will execute the specified command and arguments in the configured working directory with the defined environment variables. ### Method POST ### Endpoint N/A (Java Method) ### Throws - `NullPointerException` - If any element in the command list is null. - `IndexOutOfBoundsException` - If the command list is empty. - `UnsupportedOperationException` - If the operating system does not support process creation. - `IOException` - If an I/O error occurs during process startup. ### Returns `Process` - A new `Process` object for managing the subprocess. ``` -------------------------------- ### getMinimum Source: https://devdocs.io/openjdk~25/java.base/java/time/temporal/valuerange Gets the minimum value that the field can take. For example, the ISO day-of-month always starts at 1. The minimum is therefore 1. ```APIDOC ## getMinimum ### Description Gets the minimum value that the field can take. For example, the ISO day-of-month always starts at 1. The minimum is therefore 1. ### Returns - `long` - the minimum value for this field ``` -------------------------------- ### BasicSplitPaneUI Installation Methods Source: https://devdocs.io/openjdk~25-class-basicsplitpaneui Methods for installing UI defaults, keyboard actions, and listeners. ```APIDOC ## installDefaults() ### Description Installs the default values for the split pane UI. ### Method Installation ### Parameters None ## installKeyboardActions() ### Description Installs the keyboard actions for the split pane. ### Method Installation ### Parameters None ## installListeners() ### Description Installs the event listeners for the split pane. ### Method Installation ### Parameters None ## installUI(JComponent c) ### Description Installs the UI delegate for the specified component. ### Method Installation ### Parameters - **c** (JComponent) - Required - The component to install the UI delegate on. ``` -------------------------------- ### Get Minimum Value of a Field Source: https://devdocs.io/openjdk~25/java.base/java/time/temporal/valuerange Retrieves the minimum value a temporal field can take. For example, the ISO day-of-month starts at 1. ```java public long getMinimum() ``` -------------------------------- ### Default Configuration Syntax Example Source: https://devdocs.io/openjdk~25/java.base/javax/security/auth/login/configuration Illustrates the default syntax for a Configuration file, showing application names, LoginModule classes, flags, and options. ```plaintext Name { ModuleClass Flag ModuleOptions; ModuleClass Flag ModuleOptions; ModuleClass Flag ModuleOptions; }; Name { ModuleClass Flag ModuleOptions; ModuleClass Flag ModuleOptions; }; other { ModuleClass Flag ModuleOptions; ModuleClass Flag ModuleOptions; }; ``` -------------------------------- ### getLargestMinimum Source: https://devdocs.io/openjdk~25/java.base/java/time/temporal/valuerange Gets the largest possible minimum value that the field can take. For example, the ISO day-of-month always starts at 1. The largest minimum is therefore 1. ```APIDOC ## getLargestMinimum ### Description Gets the largest possible minimum value that the field can take. For example, the ISO day-of-month always starts at 1. The largest minimum is therefore 1. ### Returns - `long` - the largest possible minimum value for this field ``` -------------------------------- ### Example Configuration Entry with Options Source: https://devdocs.io/openjdk~25/java.base/javax/security/auth/login/configuration Demonstrates a concrete Configuration entry for an application named 'Login', specifying Unix and Kerberos LoginModules with specific options. ```plaintext Login { com.sun.security.auth.module.UnixLoginModule required; com.sun.security.auth.module.Krb5LoginModule optional useTicketCache="true" ticketCache="${user.home}${/}tickets"; }; ``` -------------------------------- ### Getting DecimalFormatSymbols for a Specific Locale Source: https://devdocs.io/openjdk/java.base/java/text/decimalformatsymbols Retrieves the DecimalFormatSymbols instance for a specified locale. This method supports locales from the Java runtime and installed providers. It can initialize with a specified numbering system if the JRE supports it, demonstrated by the example using Thai numbering. ```java public static final DecimalFormatSymbols getInstance(Locale locale) { // ... implementation details ... } // Example usage for Thai numbering system: NumberFormat.getNumberInstance(Locale.forLanguageTag("th-TH-u-nu-thai")) ``` -------------------------------- ### Example Domain Configuration Source: https://devdocs.io/openjdk~25/java.base/java/security/domainloadstoreparameter This example demonstrates a keystore domain named 'app1' with three keystores: 'app1-truststore', 'system-truststore', and 'app1-keystore'. It shows how to specify URIs and types for each keystore. ```plaintext domain app1 { keystore app1-truststore keystoreURI="file:///app1/etc/truststore.jks"; keystore system-truststore keystoreURI="${java.home}/lib/security/cacerts"; keystore app1-keystore keystoreType="PKCS12" keystoreURI="file:///app1/etc/keystore.p12"; }; ``` -------------------------------- ### Get Start Point Source: https://devdocs.io/openjdk~25/java.desktop/java/awt/geom/line2d.float Retrieves the start Point2D object of this line segment. ```java public Point2D getP1() ``` -------------------------------- ### Highlighter.install() Source: https://devdocs.io/openjdk~25-interface-highlighter Installs the highlighter onto the interface. ```APIDOC ## Highlighter.install() ### Description Installs the highlighter onto the interface. ### Method (Not specified in source) ### Endpoint (Not specified in source) ### Parameters (Not specified in source) ### Request Example (Not specified in source) ### Response (Not specified in source) ``` -------------------------------- ### Get Starting Angle of Arc Source: https://devdocs.io/openjdk~25/java.desktop/java/awt/geom/arc2d Returns the starting angle of the arc in degrees. ```java public double getAngleStart() ``` -------------------------------- ### Get Gap Start in GapContent Source: https://devdocs.io/openjdk/java.desktop/javax/swing/text/gapcontent Retrieves the starting index of the gap in the content buffer. ```java protected final int getGapStart() ``` -------------------------------- ### Starting a Simple Process Source: https://devdocs.io/openjdk~25/java.base/java/lang/processbuilder Starts a new operating system process using the default working directory and environment. This is the most basic way to launch an external command. ```java Process p = new ProcessBuilder("myCommand", "myArg").start(); ``` -------------------------------- ### Basic RowFilter Example: Starts With 'a' Source: https://devdocs.io/openjdk~25/java.desktop/javax/swing/rowfilter This example demonstrates a RowFilter that includes entries where at least one column's string value starts with the letter 'a'. It iterates through all columns of an entry to check the condition. ```java RowFilter startsWithAFilter = new RowFilter() { public boolean include(Entry entry) { for (int i = entry.getValueCount() - 1; i >= 0; i--) { if (entry.getStringValue(i).startsWith("a")) { // The value starts with "a", include it return true; } } // None of the columns start with "a"; return false so that this // entry is not shown return false; } }; ``` -------------------------------- ### BasicRootPaneUI Installation Methods Source: https://devdocs.io/openjdk~25-class-basicrootpaneui Methods for installing components, defaults, keyboard actions, and listeners for BasicRootPaneUI. ```APIDOC ## installComponents() ### Description Installs the components for the BasicRootPaneUI. ### Method Instance Method ### Parameters None ``` ```APIDOC ## installDefaults() ### Description Installs the default settings for the BasicRootPaneUI. ### Method Instance Method ### Parameters None ``` ```APIDOC ## installKeyboardActions() ### Description Installs the keyboard actions for the BasicRootPaneUI. ### Method Instance Method ### Parameters None ``` ```APIDOC ## installListeners() ### Description Installs the event listeners for the BasicRootPaneUI. ### Method Instance Method ### Parameters None ``` -------------------------------- ### start Method Source: https://devdocs.io/openjdk/java.management/javax/management/monitor/monitor Abstract method to start the monitor. Must be implemented by subclasses. ```java public abstract void start() ``` -------------------------------- ### Get Start Time of Recorded Event Source: https://devdocs.io/openjdk/jdk.jfr/jdk/jfr/consumer/recordedevent Retrieves the start time of the event. For instant events, start time and end time are identical. ```java public Instant getStartTime() ``` -------------------------------- ### autoStart() Source: https://devdocs.io/openjdk~25/jdk.compiler/com/sun/source/util/plugin Returns whether or not this plugin should be automatically started, even if not explicitly specified in the command-line options. If true, the plugin is initialized with an empty argument array. ```APIDOC ## autoStart() ### Description Returns whether or not this plugin should be automatically started, even if not explicitly specified in the command-line options. This method will be called by javac for all plugins located by the service loader. If the method returns `true`, the plugin will be `initialized` with an empty array of string arguments if it is not otherwise initialized due to an explicit command-line option. ### Method ```java default boolean autoStart() ``` ### Returns - **boolean**: whether or not this plugin should be automatically started ``` -------------------------------- ### Get a Specific Installed Provider Source: https://devdocs.io/openjdk/java.base/java/security/security Returns the security provider installed with the specified name, if it exists. ```Java public static Provider getProvider(String name) ``` -------------------------------- ### EditorKit install() Method Source: https://devdocs.io/openjdk/java.desktop/javax/swing/text/editorkit Called when the EditorKit is being installed into a JEditorPane. This method is intended for setup operations. ```java public void install(JEditorPane c) ``` -------------------------------- ### installDefaults Method Source: https://devdocs.io/openjdk/java.desktop/javax/swing/plaf/basic/basictooltipui Installs default properties for the tooltip UI. ```APIDOC ## installDefaults(JComponent c) ### Description Installs default properties. ### Method `protected void installDefaults(JComponent c)` ### Parameters #### Path Parameters - **c** (JComponent) - a component ``` -------------------------------- ### installDefaults Source: https://devdocs.io/openjdk~25/java.desktop/javax/swing/plaf/synth/synthinternalframeui Installs the defaults for the SynthInternalFrameUI. ```APIDOC ## installDefaults() ### Description Installs the defaults. ### Overrides `installDefaults` in class `BasicInternalFrameUI` ``` -------------------------------- ### Get Recording Start Time Source: https://devdocs.io/openjdk~25/jdk.management.jfr/jdk/management/jfr/recordinginfo Retrieves the start time of the recording, measured in milliseconds since the epoch. Returns null if the recording has not yet started. ```Java public long getStartTime() ``` -------------------------------- ### Create Source File Example Source: https://devdocs.io/openjdk/java.compiler/javax/annotation/processing/filer Demonstrates how to create a source file using the Filer interface, passing the originating element as a hint. This is useful for generating new source files based on existing code elements. ```Java filer.createSourceFile("GeneratedFromUserSource", eltUtils.getTypeElement("UserSource")); ``` -------------------------------- ### Method: getRunStart Source: https://devdocs.io/openjdk~25/java.base/java/text/bidi Gets the starting index of a specified logical run. This is an offset relative to the start of the line. ```java int getRunStart(int run) ``` -------------------------------- ### Get Recording Start Time Source: https://devdocs.io/openjdk/jdk.management.jfr/jdk/management/jfr/recordinginfo Retrieves the start time of the JFR recording, measured in milliseconds since the epoch. Returns null if the recording has not yet started. ```java public long getStartTime() ``` -------------------------------- ### Get Link Start and End Index Source: https://devdocs.io/openjdk/java.desktop/javax/accessibility/accessiblehyperlink Retrieves the start and end indices of the hyperlink within its hypertext document. ```java public abstract int getEndIndex() ``` ```java public abstract int getStartIndex() ``` -------------------------------- ### installDefaults Source: https://devdocs.io/openjdk~25/java.desktop/javax/swing/plaf/synth/synthsplitpaneui Installs the UI defaults for the SynthSplitPaneUI. ```APIDOC ## installDefaults() ### Description Installs the UI defaults. ### Method `protected void installDefaults()` ### Overrides `installDefaults` in class `BasicSplitPaneUI` ``` -------------------------------- ### Create RecordingStream with Default Configuration Source: https://devdocs.io/openjdk/jdk.jfr/jdk/jfr/consumer/recordingstream This example shows how to create a RecordingStream using a predefined 'default' configuration and register a general event handler to print all events to standard output. The stream is then started. ```java var c = Configuration.getConfiguration("default"); try (var rs = new RecordingStream(c)) { rs.onEvent(System.out::println); rs.start(); } ``` -------------------------------- ### Get Matcher Region Start Index Source: https://devdocs.io/openjdk/java.base/java/util/regex/matcher Reports the starting index (inclusive) of the region where the matcher searches for matches. ```Java public int regionStart() ``` -------------------------------- ### installDefaults Method Source: https://devdocs.io/openjdk~25/java.desktop/javax/swing/plaf/basic/basiccolorchooserui Installs default properties for the UI. ```APIDOC ## installDefaults() ### Description Installs default properties. ### Method `protected void installDefaults()` ``` -------------------------------- ### Get All Installed Security Providers Source: https://devdocs.io/openjdk/java.base/java/security/security Returns an array containing all security providers currently installed in the Java environment. ```Java public static Provider[] getProviders() ``` -------------------------------- ### installDefaults Method Source: https://devdocs.io/openjdk/java.desktop/javax/swing/plaf/basic/basictooltipui Installs the default properties for the tool tip UI on the specified component. ```java protected void installDefaults(JComponent c) ``` -------------------------------- ### Get start index of a run Source: https://devdocs.io/openjdk~25/java.base/java/text/bidi Finds the starting character index for a specified logical run within the text line. ```java public int getRunStart(int run) ``` -------------------------------- ### Get Start Index of Previous Match Source: https://devdocs.io/openjdk/java.base/java/util/regex/matcher Returns the starting index of the most recent match. This method is part of the `MatchResult` interface. ```Java public int start() ``` -------------------------------- ### start() Source: https://devdocs.io/openjdk/java.management/javax/management/monitor/stringmonitor Starts the StringMonitor. ```APIDOC ## start() ### Description Starts the StringMonitor, enabling it to monitor the specified string attribute and trigger notifications based on the configured conditions. ### Method START ### Endpoint N/A ### Parameters None ### Request Example N/A ### Response N/A ``` -------------------------------- ### Get LocalDateTime at Start of Day Source: https://devdocs.io/openjdk/java.base/java/time/localdate Combines the `LocalDate` with the time of midnight (00:00) to create a `LocalDateTime` representing the start of this date. ```java public LocalDateTime atStartOfDay() ``` -------------------------------- ### Example Usage of documentBaseKey Source: https://devdocs.io/openjdk~25/java.desktop/javax/swing/plaf/basic/basichtml An example demonstrating how to set the document base key client property on a JComponent to resolve relative resource paths. ```java jComponent.putClientProperty( documentBaseKey, xxx.class.getResource("resources/")); ``` -------------------------------- ### JTextArea.getLineStartOffset() Source: https://devdocs.io/openjdk~25-class-jtextarea Gets the offset of the start of a given line. ```APIDOC ## JTextArea.getLineStartOffset() ### Description Returns the offset of the start of the specified line in the text area. ### Method `int getLineStartOffset(int line)` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **line** (int) - Required - The line number (0-based) for which to get the start offset. ``` -------------------------------- ### install(JEditorPane c) Source: https://devdocs.io/openjdk/java.desktop/javax/swing/text/editorkit Called when the kit is being installed into the a JEditorPane. This is used to initialize the kit with the JEditorPane. ```APIDOC ## install(JEditorPane c) ### Description Called when the kit is being installed into the a JEditorPane. ### Parameters * `c` (JEditorPane) - the JEditorPane ``` -------------------------------- ### getStartOffset Source: https://devdocs.io/openjdk/java.desktop/javax/swing/text/abstractdocument Gets the starting offset in the model for the element. ```APIDOC ## getStartOffset ### Description Gets the starting offset in the model for the element. ### Returns The starting offset of the element. ``` -------------------------------- ### installPreviewPanel Method Source: https://devdocs.io/openjdk~25/java.desktop/javax/swing/plaf/basic/basiccolorchooserui Installs the preview panel for the color chooser. ```APIDOC ## installPreviewPanel() ### Description Installs preview panel. ### Method `protected void installPreviewPanel()` ``` -------------------------------- ### NIS Server Configuration Example Source: https://devdocs.io/openjdk~25/jdk.security.auth/com/sun/security/auth/module/jndiloginmodule Example configuration for connecting to a NIS server. ```properties user.provider.url="nis://**NISServerHostName**/**NISDomain**/user" group.provider.url="nis://**NISServerHostName**/**NISDomain**/system/group" ``` -------------------------------- ### Service Provider Configuration File Example Source: https://devdocs.io/openjdk~25/java.base/java/util/serviceloader Example of a provider-configuration file for deploying service providers on the class path. The file is named after the service and lists provider class names. ```properties META-INF/services/com.example.CodecFactory com.example.impl.StandardCodecs # Standard codecs ``` -------------------------------- ### get (index, dst) Source: https://devdocs.io/openjdk/java.base/java/nio/intbuffer Absolute bulk get method. Reads integers from this buffer into the given destination array, starting at the specified index. ```APIDOC ## get (index, dst) ### Description Absolute bulk get method. Reads integers from this buffer into the given destination array, starting at the specified index. ### Method `IntBuffer get(int index, int[] dst)` `IntBuffer get(int index, int[] dst, int offset, int length)` ### Parameters #### Path Parameters - **index** (int) - The starting index in this buffer. - **dst** (int[]) - The destination array. - **offset** (int) - The starting offset in the destination array. - **length** (int) - The number of integers to read. ``` -------------------------------- ### Get Start Position of a Tree Source: https://devdocs.io/openjdk/jdk.compiler/com/sun/source/util/sourcepositions Retrieves the starting character offset of a given Tree within a CompilationUnit. Returns Diagnostic.NOPOS if the position is unavailable. ```java long getStartPosition(CompilationUnitTree file, Tree tree) ``` -------------------------------- ### Create and Initialize SimpleBindings Source: https://devdocs.io/openjdk~25/java.scripting/javax/script/simplebindings Demonstrates how to create a new SimpleBindings object and populate it with initial key-value pairs. This is useful for setting up the environment before executing a script. ```Java SimpleBindings bindings = new SimpleBindings(); bindings.put("variableName", "variableValue"); bindings.put("anotherVar", 123); ``` -------------------------------- ### start Method Source: https://devdocs.io/openjdk/java.management.rmi/javax/management/remote/rmi/rmiconnectorserver Activates the connector server, enabling it to listen for client connections. The behavior depends on the constructor parameters, potentially involving RMI server export and JNDI binding. ```APIDOC ## start ### Description Activates the connector server, that is starts listening for client connections. Calling this method when the connector server is already active has no effect. Calling this method when the connector server has been stopped will generate an `IOException`. ### Method `public void start() throws IOException` ### Details The behavior of this method when called for the first time depends on the parameters that were supplied to the constructor. First, an object of a subclass of `RMIServerImpl` is required, to export the connector server through RMI: * If an `RMIServerImpl` was supplied to the constructor, it is used. * Otherwise, if the `JMXServiceURL` was null, or its protocol part was `rmi`, an object of type `RMIJRMPServerImpl` is created. * Otherwise, the implementation can create an implementation-specific `RMIServerImpl` or it can throw `MalformedURLException`. If the given address includes a JNDI directory URL as specified in the package documentation for `javax.management.remote.rmi`, then this `RMIConnectorServer` will bootstrap by binding the `RMIServerImpl` to the given address. If the URL path part of the `JMXServiceURL` was empty or a single slash (`/`), then the RMI object will not be bound to a directory. Instead, a reference to it will be encoded in the URL path of the RMIConnectorServer address (returned by `getAddress()`). The encodings for `rmi` are described in the package documentation for `javax.management.remote.rmi`. The behavior when the URL path is neither empty nor a JNDI directory URL, or when the protocol is not `rmi`, is implementation defined, and may include throwing `MalformedURLException` when the connector server is created or when it is started. ### Throws - **`IllegalStateException`** - if the connector server has not been attached to an MBean server. - **`IOException`** - if the connector server cannot be started. ``` -------------------------------- ### Get Start Index of Hypertext Link Source: https://devdocs.io/openjdk/java.desktop/javax/accessibility/accessiblehyperlink Obtains the starting index of the hyperlink within the hypertext document. This is useful for precise navigation and selection. ```Java public abstract int getStartIndex() ``` -------------------------------- ### Get Scanline Stride in SinglePixelPackedSampleModel Source: https://devdocs.io/openjdk/java.desktop/java/awt/image/singlepixelpackedsamplemodel Retrieves the scanline stride, which is the number of data array elements between the start of one scanline and the start of the next. ```java public int getScanlineStride() { return scanlineStride; } ``` -------------------------------- ### Minimal HTTP Server Example Source: https://devdocs.io/openjdk~25/jdk.httpserver/com/sun/net/httpserver/package-summary Demonstrates the creation of a basic HTTP server that listens on a specified port and handles requests for a particular path. It requires implementing the HttpHandler interface to process incoming requests. ```Java class MyHandler implements HttpHandler { public void handle(HttpExchange t) throws IOException { InputStream is = t.getRequestBody(); read(is); // .. read the request body String response = "This is the response"; t.sendResponseHeaders(200, response.length()); OutputStream os = t.getResponseBody(); os.write(response.getBytes()); os.close(); } } HttpServer server = HttpServer.create(new InetSocketAddress(8000), 0); server.createContext("/applications/myapp", new MyHandler()); server.setExecutor(null); // creates a default executor server.start(); ``` -------------------------------- ### Initialize UIDefaults with Key-Value Pairs Example Source: https://devdocs.io/openjdk~25/java.desktop/javax/swing/uidefaults An example demonstrating how to initialize a UIDefaults object using an array of key-value pairs for properties like Font, Color, and Integer. ```java Object[] uiDefaults = { "Font", new Font("Dialog", Font.BOLD, 12), "Color", Color.red, "five", Integer.valueOf(5) } UIDefaults myDefaults = new UIDefaults(uiDefaults); ``` -------------------------------- ### Get Installed Login Configuration Source: https://devdocs.io/openjdk~25/java.base/javax/security/auth/login/configuration Retrieves the currently installed login Configuration. Returns the configuration set via setConfiguration, or a default if none has been set. ```java public static Configuration getConfiguration() ``` -------------------------------- ### installDefaults Source: https://devdocs.io/openjdk/java.desktop/javax/swing/plaf/synth/synthviewportui Installs default settings for a viewport. ```APIDOC ## installDefaults(JComponent c) ### Description Installs defaults for a viewport. ### Method `protected void installDefaults(JComponent c)` ### Parameters #### Path Parameters - **c** (JComponent) - A `JViewport` object. ``` -------------------------------- ### installUI Method Source: https://devdocs.io/openjdk~25/java.desktop/javax/swing/plaf/basic/basiceditorpaneui Installs the UI for a component, including setting opacity, installing caret and highlighter, attaching to the editor and model, and creating the view hierarchy. ```APIDOC ## installUI(JComponent c) ### Description Installs the UI for a component. This does the following things: 1. Sets the associated component to opaque if the opaque property has not already been set by the client program. This will cause the component's background color to be painted. 2. Installs the default caret and highlighter into the associated component. These properties are only set if their current value is either `null` or an instance of `UIResource`. 3. Attaches to the editor and model. If there is no model, a default one is created. 4. Creates the view factory and the view hierarchy used to represent the model. ### Method `public void installUI(JComponent c)` ### Parameters #### Path Parameters - **c** (JComponent) - the editor component ### Since 1.5 ### See Also - `ComponentUI.installUI(JComponent)` ### Overrides - `installUI` in class `BasicTextUI` ``` -------------------------------- ### Get Installed FileSystemProviders Source: https://devdocs.io/openjdk/java.base/java/nio/file/spi/filesystemprovider Returns an unmodifiable list of all installed file system providers. The first call initializes the default provider and loads others. ```java public static List installedProviders() ``` -------------------------------- ### CharsetProvider Configuration File Example Source: https://devdocs.io/openjdk/java.base/java/nio/charset/spi/charsetprovider Example content for a META-INF/services/java.nio.charset.spi.CharsetProvider file, listing concrete charset provider classes. ```text # Example configuration file content # com.example.MyCharsetProvider # com.example.AnotherCharsetProvider ``` -------------------------------- ### Get Begin Index Source: https://devdocs.io/openjdk~25/java.base/java/text/characteriterator Returns the starting index of the text being iterated. ```java int getBeginIndex() ``` -------------------------------- ### FileObject.getName() Example Source: https://devdocs.io/openjdk/java.compiler/javax/tools/fileobject Demonstrates how to get the name of a file represented by a FileObject. ```Java FileObject.getName() ``` -------------------------------- ### Starting a new process with default working directory and environment Source: https://devdocs.io/openjdk~25/java.base/java/lang/processbuilder This snippet demonstrates how to start a new process using ProcessBuilder with a command and its arguments. The process will inherit the default working directory and environment of the current process. ```APIDOC ## ProcessBuilder.start() ### Description Starts a new process with the command and arguments specified in the ProcessBuilder. ### Method `start()` ### Endpoint N/A (Java method call) ### Parameters None directly on the `start()` method, attributes are set on the `ProcessBuilder` instance before calling `start()`. ### Request Example ```java Process p = new ProcessBuilder("myCommand", "myArg").start(); ``` ### Response #### Success Response Returns a `Process` object representing the newly created subprocess. #### Response Example ```java Process process = ...; // Result of pb.start() ``` ``` -------------------------------- ### MonitorMBean.start() Source: https://devdocs.io/openjdk~25-interface-monitormbean Starts the monitoring process for all configured observed objects. ```APIDOC ## MonitorMBean.start() ### Description Starts the monitoring process for all configured observed objects. ### Method Not specified (likely a Java method call) ### Response - **Success**: void ### Example ```java monitorMBean.start(); ``` ``` -------------------------------- ### FileObject.getCharContent() Example Source: https://devdocs.io/openjdk/java.compiler/javax/tools/fileobject Shows how to get the character content of a file as a CharSequence. ```Java FileObject.getCharContent() ``` -------------------------------- ### get(int index, char[] dst) Source: https://devdocs.io/openjdk/java.base/java/nio/charbuffer Transfers characters from this CharBuffer into a destination character array starting at a specified index. This is an absolute bulk get operation. ```APIDOC ## get(int index, char[] dst) ### Description Transfers chars from this buffer into the given destination array. The position of this buffer is unchanged. This method behaves in the same way as `src.get(index, dst, 0, dst.length)`. ### Method `get` ### Parameters #### Path Parameters - **index** (int) - The index in this buffer from which the first char will be read; must be non-negative and less than `limit()` - **dst** (char[]) - The destination array ### Returns This buffer ### Throws - `IndexOutOfBoundsException` - If `index` is negative, not smaller than `limit()`, or `limit() - index < dst.length` ### Since 13 ``` -------------------------------- ### process() Method Source: https://devdocs.io/openjdk/jdk.jdi/com/sun/jdi/connect/vmstartexception Returns the Process object for the launched target VM, which can be used to diagnose startup errors. ```java public Process process() ``` -------------------------------- ### Get Day of Week in Month Adjuster Source: https://devdocs.io/openjdk~25/java.base/java/time/temporal/temporaladjusters Returns an adjuster that sets the date to the ordinal day-of-week within the month. For example, to get the third Wednesday of June. ```java TemporalAdjuster dayOfWeekInMonth = TemporalAdjusters.dayOfWeekInMonth(3, DayOfWeek.WEDNESDAY); ``` -------------------------------- ### init(KeyStore ks, char[] password) Source: https://devdocs.io/openjdk/java.base/javax/net/ssl/keymanagerfactory Initializes the KeyManagerFactory with a KeyStore and its password for obtaining key material. ```APIDOC ## init(KeyStore ks, char[] password) ### Description Initializes this factory with a source of key material. The provider typically uses a KeyStore for obtaining key material for use during secure socket negotiations. The KeyStore is generally password-protected. For more flexible initialization, please see `init(ManagerFactoryParameters)`. ### Method void ### Parameters * `ks` (KeyStore) - The key store or null. * `password` (char[]) - The password for recovering keys in the KeyStore. ### Throws * `KeyStoreException` - if this operation fails. * `NoSuchAlgorithmException` - if the specified algorithm is not available from the specified provider. * `UnrecoverableKeyException` - if the key cannot be recovered (e.g. the given password is wrong). ``` -------------------------------- ### Example: Thread-Local Unique Identifiers Source: https://devdocs.io/openjdk~25/java.base/java/lang/threadlocal Demonstrates how to use ThreadLocal to generate unique IDs for each thread. Each thread gets its ID upon the first call to get(). ```java import java.util.concurrent.atomic.AtomicInteger; public class ThreadId { // Atomic integer containing the next thread ID to be assigned private static final AtomicInteger nextId = new AtomicInteger(0); // Thread local variable containing each thread's ID private static final ThreadLocal threadId = new ThreadLocal() { @Override protected Integer initialValue() { return nextId.getAndIncrement(); } }; // Returns the current thread's unique ID, assigning it if necessary public static int get() { return threadId.get(); } } ``` -------------------------------- ### installChooserPanel() Source: https://devdocs.io/openjdk/java.desktop/javax/swing/colorchooser/abstractcolorchooserpanel Installs the chooser panel. ```APIDOC ## installChooserPanel() ### Description This method is called by the `JColorChooser` when this chooser panel is added to the `JColorChooser`. Subclasses should override this method to perform any necessary setup. ### Method `protected void installChooserPanel()` ### Endpoint N/A ### Parameters None ### Request Example N/A ### Response N/A ``` -------------------------------- ### getInit Method Source: https://devdocs.io/openjdk/java.management/java/lang/management/memoryusage Retrieves the initial amount of memory in bytes that the Java virtual machine requests from the operating system. Returns -1 if undefined. ```java public long getInit() ``` -------------------------------- ### Get Text Start Offset Source: https://devdocs.io/openjdk~25/java.xml/javax/xml/stream/xmlstreamreader Returns the starting position of the text for the current text event within the character array. This method is only valid for text-related states. ```Java int getTextStart() ``` -------------------------------- ### Namespace Support Example Session Source: https://devdocs.io/openjdk~25/java.xml/org/xml/sax/helpers/namespacesupport Demonstrates a typical session using NamespaceSupport to declare prefixes, process qualified names, and manage contexts. This example shows how to push and pop contexts, declare prefixes, and extract namespace information from qualified names. ```java String parts[] = new String[3]; NamespaceSupport support = new NamespaceSupport(); support.pushContext(); support.declarePrefix("", "http://www.w3.org/1999/xhtml"); support.declarePrefix("dc", "http://www.purl.org/dc#"); parts = support.processName("p", parts, false); System.out.println("Namespace URI: " + parts[0]); System.out.println("Local name: " + parts[1]); System.out.println("Raw name: " + parts[2]); parts = support.processName("dc:title", parts, false); System.out.println("Namespace URI: " + parts[0]); System.out.println("Local name: " + parts[1]); System.out.println("Raw name: " + parts[2]); support.popContext(); ``` -------------------------------- ### Get Visible Paths From a Specific Path Source: https://devdocs.io/openjdk~25/java.desktop/javax/swing/tree/abstractlayoutcache Retrieves an enumeration of visible tree paths starting from a given path. Returns null if the starting path is not visible. ```java public abstract Enumeration getVisiblePathsFrom(TreePath path) ``` -------------------------------- ### Get Selection Start Index Source: https://devdocs.io/openjdk~25/java.desktop/javax/swing/text/jtextcomponent Returns the starting offset of the selected text. If no text is selected, it returns the caret position. For empty text, it returns 0. ```java public int getSelectionStart() ``` -------------------------------- ### Example Usage of EventSettings Source: https://devdocs.io/openjdk~25/jdk.jfr/jdk/jfr/eventsettings Demonstrates how to enable specific events, configure their settings (period, stack trace, threshold), start, stop, and dump a recording. ```java try (Recording r = new Recording()) { r.enable("jdk.CPULoad") .withPeriod(Duration.ofSeconds(1)); r.enable("jdk.FileWrite") .withoutStackTrace() .withThreshold(Duration.ofNanos(10)); r.start(); Thread.sleep(10_000); r.stop(); r.dump(Files.createTempFile("recording", ".jfr")); } ``` -------------------------------- ### Get Start Index of Match (Java) Source: https://devdocs.io/openjdk~25/java.base/java/util/regex/matchresult Returns the starting index of the entire subsequence matched by the regular expression. Throws IllegalStateException if no match has been attempted or failed. ```java int start() ``` -------------------------------- ### installListeners() Source: https://devdocs.io/openjdk~25-class-basicseparatorui Installs the event listeners for the BasicSeparatorUI. ```APIDOC ## installListeners() ### Description Installs the event listeners for the BasicSeparatorUI. ### Method Instance Method ### Parameters None ### Response None ``` -------------------------------- ### Caret.install() Source: https://devdocs.io/openjdk~25-interface-caret Installs the caret, associating it with a component. ```APIDOC ## Caret.install() ### Description Installs the caret, associating it with a component. ### Method Not applicable (Java method) ### Parameters * **component** (JTextComponent) - Required - The component to associate the caret with. ### Response Void ``` -------------------------------- ### Example: Get ACL File Attribute View Source: https://devdocs.io/openjdk~25/java.base/java/nio/file/files Usage example demonstrating how to obtain an AclFileAttributeView to access or modify a file's Access Control List. ```Java Path path = ... AclFileAttributeView view = Files.getFileAttributeView(path, AclFileAttributeView.class); if (view != null) { List acl = view.getAcl(); : } ``` -------------------------------- ### Get Flow Start Source: https://devdocs.io/openjdk/java.desktop/javax/swing/text/paragraphview Fetches the starting location along the flow axis for a child view's flow span. Used in conjunction with getFlowSpan for layout. ```java public int getFlowStart(int index) ``` -------------------------------- ### start Method Source: https://devdocs.io/openjdk/java.management/javax/management/monitor/monitor Starts the monitor. This is an abstract method that must be implemented by subclasses. ```APIDOC ## start ```java public abstract void start() ``` ### Description Starts the monitor. Specified by: `start` in interface `MonitorMBean` ### Method ```java public abstract void start() ``` ``` -------------------------------- ### getSelectionStart Source: https://devdocs.io/openjdk~25/java.desktop/java/awt/textcomponent Gets the starting index of the currently selected text within this component. ```APIDOC ## getSelectionStart ### Description Gets the start position of the selected text in this text component. ### Method int getSelectionStart() ### Returns The start position of the selected text. ### See Also * `setSelectionStart(int)` * `getSelectionEnd()` ``` -------------------------------- ### installDefaults Method Source: https://devdocs.io/openjdk/java.desktop/javax/swing/plaf/basic/basicseparatorui Installs the default properties for the separator UI. ```APIDOC ## installDefaults(JSeparator s) ### Description Installs default properties. ### Method `protected void installDefaults(JSeparator s)` ### Parameters #### Path Parameters - **s** (JSeparator) - an instance of `JSeparator` ``` -------------------------------- ### Get Element Name Source: https://devdocs.io/openjdk/java.xml/javax/xml/stream/events/startelement Retrieves the qualified name of the start element event. ```Java QName getName() ``` -------------------------------- ### BasicLabelUI.installDefaults Source: https://devdocs.io/openjdk~25-class-basiclabelui Installs the defaults for the transition. This method is called when the UI is installed on a component. ```APIDOC ## BasicLabelUI.installDefaults(AbstractButton c) ### Description Installs the defaults for the transition. ### Method Instance Method ### Parameters * **c** (AbstractButton) - The component to install defaults on. ``` -------------------------------- ### Java ProcessBuilder startPipeline Example Source: https://devdocs.io/openjdk~25/java.base/java/lang/processbuilder Demonstrates how to use startPipeline to create a process pipeline for counting unique imports in Java files. It shows the setup of multiple ProcessBuilders and how to retrieve and process the output from the last process in the pipeline. ```Java String directory = "/home/duke/src"; ProcessBuilder[] builders = { new ProcessBuilder("find", directory, "-type", "f"), new ProcessBuilder("xargs", "grep", "-h", "^import "), new ProcessBuilder("awk", "{print $2;}"), new ProcessBuilder("sort", "-u")}; List processes = ProcessBuilder.startPipeline( Arrays.asList(builders)); Process last = processes.get(processes.size() - 1); try (InputStream is = last.getInputStream(); Reader isr = new InputStreamReader(is); BufferedReader r = new BufferedReader(isr)) { long count = r.lines().count(); } ``` -------------------------------- ### getOffset Method Source: https://devdocs.io/openjdk/java.desktop/javax/swing/text/defaultstyleddocument.elementspec Gets the starting offset within the character array for this ElementSpec. ```APIDOC ## Method getOffset ### Description Gets the starting offset. ### Returns * int - the offset >= 0 ``` -------------------------------- ### Build and Configure HttpClient Source: https://devdocs.io/openjdk~25/java.net.http/java/net/http/httpclient.version Demonstrates how to build and configure an HttpClient instance with specific settings like HTTP version, redirect policy, connection timeout, proxy, and authenticator. ```java HttpClient client = HttpClient.newBuilder() .version(Version.HTTP_1_1) .followRedirects(Redirect.NORMAL) .connectTimeout(Duration.ofSeconds(20)) .proxy(ProxySelector.of(new InetSocketAddress("proxy.example.com", 80))) .authenticator(Authenticator.getDefault()) .build(); ``` -------------------------------- ### Get Text Begin Index Source: https://devdocs.io/openjdk/java.base/java/text/characteriterator Returns the starting index of the text being iterated. ```java int getBeginIndex() ``` -------------------------------- ### get(int index, short[] dst) Source: https://devdocs.io/openjdk~25/java.base/java/nio/shortbuffer Transfers shorts from this buffer into a destination array starting at a specified index. This is a convenience method that calls the more detailed get method. ```APIDOC ## get(int index, short[] dst) ### Description Absolute bulk get method. Transfers shorts from this buffer into the given destination array. The position of this buffer is unchanged. This method behaves identically to `src.get(index, dst, 0, dst.length)`. ### Parameters * **index** (int) - The index in this buffer from which the first short will be read; must be non-negative and less than `limit()` * **dst** (short[]) - The destination array ### Returns This buffer ### Throws * **IndexOutOfBoundsException** - If `index` is negative, not smaller than `limit()`, or `limit() - index < dst.length` ### Since 13 ``` -------------------------------- ### engineInit Source: https://devdocs.io/openjdk~25/java.base/javax/net/ssl/keymanagerfactoryspi Initializes this factory with a source of key material using a KeyStore and password. ```APIDOC ## engineInit(KeyStore ks, char[] password) ### Description Initializes this factory with a source of key material. ### Method `protected abstract void` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters - **ks** (KeyStore) - the key store or null - **password** (char[]) - the password for recovering keys ### Throws - **KeyStoreException** - if this operation fails - **NoSuchAlgorithmException** - if the specified algorithm is not available from the specified provider. - **UnrecoverableKeyException** - if the key cannot be recovered ``` -------------------------------- ### Get TransformService Instance Source: https://devdocs.io/openjdk/java.xml.crypto/javax/xml/crypto/dsig/transformservice Obtain a TransformService instance for a specific algorithm URI and XML mechanism type. For example, to get the XPath 2.0 transform service for DOM. ```java TransformService ts = TransformService.getInstance(Transform.XPATH2, "DOM"); ``` -------------------------------- ### Launching JConsole with Plugins Source: https://devdocs.io/openjdk~25/jdk.jconsole/com/sun/tools/jconsole/jconsoleplugin Demonstrates the command-line syntax for launching JConsole and specifying the path to custom plugin JAR files or directories. ```bash jconsole -pluginpath ```