/** * Returns the content encoding if available. This is only available * for some protocols. */ public String getContentEncoding(String userAgent) { if (contentEncoding != null) return contentEncoding; if (!hasBeenOpened) { try { openStreamInternal(userAgent, null, null); } catch (IOException ioe) { /* nothing */ } } return contentEncoding; }
/** * Returns the content type if available. This is only available * for some protocols. */ public String getContentType(String userAgent) { if (contentType != null) return contentType; if (!hasBeenOpened) { try { openStreamInternal(userAgent, null, null); } catch (IOException ioe) { /* nothing */ } } return contentType; }
/** * Returns the content encoding if available. This is only available * for some protocols. */ public String getContentEncoding(String userAgent) { if (contentEncoding != null) return contentEncoding; if (!hasBeenOpened) { try { openStreamInternal(userAgent, null, null); } catch (IOException ioe) { /* nothing */ } } return contentEncoding; }
/** * Open the stream and returns it. No checks are made to see * if the stream is compressed or encoded in any way. * @param userAgent The user agent opening the stream (may be null). * @param mimeTypes The expected mime types of the content * in the returned InputStream (mapped to Http accept * header among other possability). The elements of * the iterator must be strings (may be null) */ public InputStream openStreamRaw(String userAgent, Iterator mimeTypes) throws IOException { InputStream ret = openStreamInternal(userAgent, mimeTypes, null); stream = null; return ret; }
/** * Open the stream and returns it. No checks are made to see * if the stream is compressed or encoded in any way. * @param userAgent The user agent opening the stream (may be null). * @param mimeTypes The expected mime types of the content * in the returned InputStream (mapped to Http accept * header among other possability). The elements of * the iterator must be strings (may be null) */ public InputStream openStreamRaw(String userAgent, Iterator mimeTypes) throws IOException { InputStream ret = openStreamInternal(userAgent, mimeTypes, null); stream = null; return ret; }
/** * Returns the content encoding if available. This is only available * for some protocols. */ public String getContentEncoding(String userAgent) { if (contentEncoding != null) return contentEncoding; if (!hasBeenOpened) { try { openStreamInternal(userAgent, null, null); } catch (IOException ioe) { /* nothing */ } } return contentEncoding; }
/** * Returns the content type if available. This is only available * for some protocols. */ public String getContentType(String userAgent) { if (contentType != null) return contentType; if (!hasBeenOpened) { try { openStreamInternal(userAgent, null, null); } catch (IOException ioe) { /* nothing */ } } return contentType; }
/** * Returns the content type if available. This is only available * for some protocols. */ public String getContentType(String userAgent) { if (contentType != null) return contentType; if (!hasBeenOpened) { try { openStreamInternal(userAgent, null, null); } catch (IOException ioe) { /* nothing */ } } return contentType; }
/** * Open the stream and returns it. No checks are made to see * if the stream is compressed or encoded in any way. * @param userAgent The user agent opening the stream (may be null). * @param mimeTypes The expected mime types of the content * in the returned InputStream (mapped to Http accept * header among other possability). The elements of * the iterator must be strings (may be null) */ public InputStream openStreamRaw(String userAgent, Iterator mimeTypes) throws IOException { InputStream ret = openStreamInternal(userAgent, mimeTypes, null); stream = null; return ret; }
/** * Open the stream and check for common compression types. If * the stream is found to be compressed with a standard * compression type it is automatically decompressed. * @param userAgent The user agent opening the stream (may be null). * @param mimeTypes The expected mime types of the content * in the returned InputStream (mapped to Http accept * header among other possability). The elements of * the iterator must be strings (may be null) */ public InputStream openStream(String userAgent, Iterator mimeTypes) throws IOException { InputStream raw = openStreamInternal(userAgent, mimeTypes, acceptedEncodings.iterator()); if (raw == null) return null; stream = null; return checkGZIP(raw); }
/** * Open the stream and check for common compression types. If * the stream is found to be compressed with a standard * compression type it is automatically decompressed. * @param userAgent The user agent opening the stream (may be null). * @param mimeTypes The expected mime types of the content * in the returned InputStream (mapped to Http accept * header among other possability). The elements of * the iterator must be strings (may be null) */ public InputStream openStream(String userAgent, Iterator mimeTypes) throws IOException { InputStream raw = openStreamInternal(userAgent, mimeTypes, acceptedEncodings.iterator()); if (raw == null) return null; stream = null; return checkGZIP(raw); }
/** * Open the stream and check for common compression types. If * the stream is found to be compressed with a standard * compression type it is automatically decompressed. * @param userAgent The user agent opening the stream (may be null). * @param mimeTypes The expected mime types of the content * in the returned InputStream (mapped to Http accept * header among other possability). The elements of * the iterator must be strings (may be null) */ public InputStream openStream(String userAgent, Iterator mimeTypes) throws IOException { InputStream raw = openStreamInternal(userAgent, mimeTypes, acceptedEncodings.iterator()); if (raw == null) return null; stream = null; return checkGZIP(raw); }