public final class Format
extends java.lang.Object
InventoryPrinter
services indicate supported formats listing any of
these values in their InventoryPrinter.FORMAT
service
properties.
Requestors of inventory printing indicate the desired output format by
specifying the respective constant when calling the
InventoryPrinter.print(java.io.PrintWriter, Format, boolean)
method.
Round-tripping is guaranteed between the toString()
and
valueOf(String)
methods.
Modifier and Type | Field and Description |
---|---|
static Format |
HTML
Inventory is printed in HTML format.
|
static Format |
JSON
Inventory is printed in JSON format.
|
static Format |
TEXT
Inventory is printed in plain text format.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
toString()
Returns the string value of this format.
|
static Format |
valueOf(java.lang.String format)
Converts the given
format string into an instance of
this class. |
public static Format TEXT
public static Format HTML
Technically the output is expected to be an HTML fragment which is
intended to be inserted into any block element, such as <div>
,
within a HTML <body>
.
public static Format JSON
The output is expected to be a valid JSON object. That is, the output
must start with an opening curly brace ({
) and end with a
closing curly brace (}
).
public static Format valueOf(java.lang.String format)
format
string into an instance of
this class.format
- The string value to be converted into a Format
.Format
constants or null
.public java.lang.String toString()
toString
in class java.lang.Object
"Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"