Package de.frankmuenster.mahoe.utils
Class WebUtilsHtmlUnit
- java.lang.Object
-
- de.frankmuenster.mahoe.utils.WebUtilsHtmlUnit
-
public final class WebUtilsHtmlUnit extends java.lang.Object
Utility class for web methods- Author:
- Frank Münster
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static byte[]
getPdfAsByteArray(com.gargoylesoftware.htmlunit.html.HtmlAnchor link)
Read the account statement PDF from an HTMLUnit anchor into a byte array.static boolean
webResponseIsJson(com.gargoylesoftware.htmlunit.WebResponse webResponse)
Überprüft die Webantwort, ob der http Statuscode 200 ist und die Antwort im JSON-Format vorliegt.
-
-
-
Method Detail
-
getPdfAsByteArray
public static byte[] getPdfAsByteArray(com.gargoylesoftware.htmlunit.html.HtmlAnchor link)
Read the account statement PDF from an HTMLUnit anchor into a byte array.- Parameters:
link
- the HMTLUnit anchor to the PDF- Returns:
- the PDF as byte array
-
webResponseIsJson
public static boolean webResponseIsJson(com.gargoylesoftware.htmlunit.WebResponse webResponse)
Überprüft die Webantwort, ob der http Statuscode 200 ist und die Antwort im JSON-Format vorliegt.- Parameters:
webResponse
-- Returns:
- true wenn HHTP code 200 und Antwortinhalt application/json ist, sonst false.
-
-