Package org.krysalis.barcode4j.tools
Class URLUtil
java.lang.Object
org.krysalis.barcode4j.tools.URLUtil
Utility functions for handling URLs.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic byte[]Returns the data pointed at by a URL as a byte array.static StringgetDataEncoding(String url) Returns the data pointed at by a URL as a byte array.static Stringstatic boolean
-
Field Details
-
URL_START
- See Also:
-
URL_END
- See Also:
-
-
Constructor Details
-
URLUtil
public URLUtil()
-
-
Method Details
-
getData
Returns the data pointed at by a URL as a byte array.- Parameters:
url- the URLencoding- the encoding to use for converting text content to binary content- Returns:
- the data as a byte array
- Throws:
IOException- if an I/O error occurs
-
getDataEncoding
Returns the data pointed at by a URL as a byte array.- Parameters:
url- the URL- Returns:
- encoding text as a string
- Throws:
IOException- if an I/O error occurs
-
isURL
-
getURL
-