public String getContent() {
        if (content != null) {
            return content;
        }

        if (stream != null) {
            Scanner scanner = new Scanner(stream, "UTF-8").useDelimiter("\\A");

            if (!scanner.hasNext()) {
                return "";
            }

            String data = scanner.next();
            scanner.close();

            return data;
        }

        return "";
    }
public String getContent ( ) { if ( content != null ) { return content ; } if ( stream != null ) { Scanner scanner = new Scanner ( stream , "UTF-8" ) . useDelimiter ( "\\A" ) ; if ( ! scanner . hasNext ( ) ) { return "" ; } String data = scanner . next ( ) ; scanner . close ( ) ; return data ; } return "" ; }
Get the the content of the response.

<p>
If there is a content string, that will be returned.
Otherwise, will get content from input stream
</p>

@return the content string