Class URLReturnData


  • public class URLReturnData
    extends Object
    This class encapsulates data returned from a URL including a byte[] array containing the contents and a map representing the header data.
    • Constructor Detail

      • URLReturnData

        public URLReturnData()
      • URLReturnData

        public URLReturnData​(byte[] pData)
        Parameters:
        pData - response contents as a byte[]
    • Method Detail

      • setData

        public void setData​(byte[] bytes)
        Set the response contents.
        Parameters:
        bytes - response contents
      • setHeaderFields

        public void setHeaderFields​(Map<String,​List<String>> headerFields)
        Set the header fields map.
        Parameters:
        headerFields - list of header fields
      • getData

        public byte[] getData()
        Return the response contents.
        Returns:
        response contents
      • getHeaderFields

        public Map<String,​List<String>> getHeaderFields()
        Returns an unmodifiable Map of the header fields. The Map keys are Strings that represent the response-header field names. Each Map value is an unmodifiable List of Strings that represents the corresponding field values.
        Returns:
        map of response header fields to a list of their field values
        See Also:
        URLConnection.getHeaderFields()