Package org.htmlunit.platform
Class Platform
java.lang.Object
org.htmlunit.platform.Platform
Singleton to handle JDK specific stuff.
This is required to support at least the differences with android.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static FontUtilprivate static XmlUtilsHelperAPIprivate static XmlUtilsHelperAPI -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ImageDatabuildImageData(InputStream inputStream) getAttributesOrderMap(Document document) Returns internal Xerces details about all elements in the specified document.static FontUtilstatic intgetIndex(NamedNodeMap namedNodeMap, Map<Integer, List<String>> attributesOrderMap, Node element, int requiredIndex) Forward the call to the correct helper.static RenderingBackendgetRenderingBackend(int imageWidth, int imageHeight)
-
Field Details
-
FontUtil_
-
HelperXerces_
-
HelperSunXerces_
-
-
Constructor Details
-
Platform
private Platform()
-
-
Method Details
-
getIndex
public static int getIndex(NamedNodeMap namedNodeMap, Map<Integer, List<String>> attributesOrderMap, Node element, int requiredIndex) Forward the call to the correct helper.- Parameters:
namedNodeMap- the node mapattributesOrderMap- the order mapelement- the noderequiredIndex- the required index- Returns:
- the index or requiredIndex
-
getAttributesOrderMap
Returns internal Xerces details about all elements in the specified document. The id of the returnedMapis thenodeIndexof an element, and the list is the array of ordered attributes names.- Parameters:
document- the document- Returns:
- the map of an element index with its ordered attribute names
-
getRenderingBackend
- Parameters:
imageWidth- the width of the image this backend is forimageHeight- the height of the image this backend is for- Returns:
- a new
RenderingBackend. If theAwtRenderingBackendcan't be used aNoOpRenderingBackendis used instead.
-
getFontUtil
- Returns:
- a new
FontUtil. If theAwtFontUtilcan't be used aNoOpFontUtilis used instead.
-
buildImageData
- Throws:
IOException
-