org.krysalis.barcode4j.tools
Class URLUtil
java.lang.Object
org.krysalis.barcode4j.tools.URLUtil
public class URLUtil
- extends java.lang.Object
Utility functions for handling URLs.
Method Summary |
static byte[] |
getData(java.lang.String url,
java.lang.String encoding)
Returns the data pointed at by a URL as a byte array. |
static java.lang.String |
getURL(java.lang.String message)
|
static boolean |
isURL(java.lang.String message)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
URL_START
public static final java.lang.String URL_START
- See Also:
- Constant Field Values
URL_END
public static final java.lang.String URL_END
- See Also:
- Constant Field Values
URLUtil
public URLUtil()
getData
public static byte[] getData(java.lang.String url,
java.lang.String encoding)
throws java.io.IOException
- 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:
java.io.IOException
- if an I/O error occurs
isURL
public static boolean isURL(java.lang.String message)
getURL
public static java.lang.String getURL(java.lang.String message)
Copyright © 2000-2010 Jeremias Maerki. All rights reserved.