Code example for HttpURLConnection

Methods: getContentType

0
        return conn.getContentLength();
    } 
 
    public String getCharSet() throws IOException {
         
        String contentType = conn.getContentType();
        // TODO: Parse contentType to get the actual value. 
        String charset = "ISO-8859-1";
        return charset;
 
    } 
 
    public String[][] getResponseHeaders() throws IOException {
 
        // TODO Auto-generated method stub 
        return null; 
    } 
 
 
    public InputStream getResponseStream() throws IOException {