Class URLUtil

java.lang.Object
org.krysalis.barcode4j.tools.URLUtil

public class URLUtil extends Object
Utility functions for handling URLs.
  • Field Details

  • Constructor Details

    • URLUtil

      public URLUtil()
  • Method Details

    • getData

      public static byte[] getData(String url, String encoding) throws IOException
      Returns the data pointed at by a URL as a byte array.
      Parameters:
      url - the URL
      encoding - 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

      public static String getDataEncoding(String url)
      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

      public static boolean isURL(String message)
    • getURL

      public static String getURL(String message)