Lines Matching refs:is

5  * This code is free software; you can redistribute it and/or modify it
11 * This code is distributed in the hope that it will be useful, but WITHOUT
14 * version 2 for more details (a copy is included in the LICENSE file that
43 * The abstract class <code>URLConnection</code> is the superclass
47 * general, creating a connection to a URL is a multistep process:
61 * <li>The connection object is created by invoking the
64 * <li>The actual connection to the remote object is made, using the
95 * the contents after the connection is made to the remote object:
114 * <code>getContentType</code> method is used by the
134 * In JDK 1.1.6 and later, <code>fileNameMap</code> is private; accessor
137 * to access it. This change is also described on the <a href=
173 * which this connection is opened.
178 * The default value of this variable is the value of the URL
187 * This variable is set by the <code>setDoInput</code> method. Its
188 * value is returned by the <code>getDoInput</code> method.
194 * The default value of this field is <code>true</code>.
202 * This variable is set by the <code>setDoOutput</code> method. Its
203 * value is returned by the <code>getDoOutput</code> method.
209 * The default value of this field is <code>false</code>.
219 * If <code>true</code>, this <code>URL</code> is being examined in
222 * then no user interaction is allowed.
226 * Its value is returned by the
228 * Its default value is the value of the argument in the last invocation
240 * If <code>true</code>, the protocol is allowed to use caching
244 * This field is set by the <code>setUseCaches</code> method. Its
245 * value is returned by the <code>getUseCaches</code> method.
247 * Its default value is the value given in the last invocation of the
261 * January 1, 1970, GMT. The object is fetched only if it has been
264 * This variable is set by the <code>setIfModifiedSince</code>
265 * method. Its value is returned by the
268 * The default value of this field is <code>0</code>, indicating
332 * If there is a security manager, this method first calls
334 * to ensure the operation is allowed.
354 * If the <code>connect</code> method is called when the connection
356 * field having the value <code>true</code>), the call is ignored.
361 * (e.g., doInput and UseCaches). After connecting, it is an
381 * java.net.SocketTimeoutException is raised. A timeout of zero is
390 * @throws IllegalArgumentException if the timeout parameter is negative
406 * 0 return implies that the option is disabled
422 * reading from Input stream when a connection is established to a
423 * resource. If the timeout expires before there is data available
424 * for read, a java.net.SocketTimeoutException is raised. A
425 * timeout of zero is interpreted as an infinite timeout.
433 * @throws IllegalArgumentException if the timeout parameter is negative
448 * option is disabled (i.e., timeout of infinity).
463 * the object referenced by the URL is not created.
488 * instead and is therefore more portable.</P>
491 * references, {@code -1} if the content length is not known,
492 * or if the content length is greater than Integer.MAX_VALUE.
506 * references, or <code>-1</code> if the content length is
540 * or 0 if not known. The value is the number of milliseconds since
552 * or <code>0</code> if not known. The value returned is the
562 * The result is the number of milliseconds since January 1, 1970 GMT.
576 * with possibly different values, only the last value is returned.
581 * if there is no such field in the header.
590 * response-header field names. Each Map value is an
612 * <code>Default</code> value is returned if the field is
634 * <code>Default</code> value is returned if the field is
648 * The result is the number of milliseconds since January 1, 1970 GMT
659 * <code>Default</code> argument is returned if the field is
705 * calling the <code>getContentType</code> method. If this is
707 * type, a content handler for that content type is created:
711 * <code>createContentHandler</code> method of that instance is called
712 * with the content type as an argument; the result is a content
720 * where &lt;<i>contentType</i>&gt; is formed by taking the
728 * class does not exist, or is not a subclass of
730 * <code>UnknownServiceException</code> is thrown.
757 * @return the object fetched that is the first match of the type
783 * object. This method returns null if no permission is
828 * is available for read.
870 * false if not. The default is true.
901 * false if not. The default is false.
967 * Ths default is "sticky", being a part of the static state of all
983 * Some protocols do caching of documents. Occasionally, it is important
986 * is true, the connection is allowed to use whatever caches it can.
1042 * Ths default is "sticky", being a part of the static state of all
1074 * @param key the keyword by which the request is known
1078 * @throws NullPointerException if key is <CODE>null</CODE>
1085 throw new NullPointerException ("key is null");
1098 * @param key the keyword by which the request is known
1102 * @throws NullPointerException if key is null
1110 throw new NullPointerException ("key is null");
1123 * @param key the keyword by which the request is known (e.g., "Accept").
1125 * connection. If key is null, then null is returned.
1143 * field names. Each Map value is a unmodifiable List
1163 * <code>URLConnection</code> is created, it is initialized with
1166 * @param key the keyword by which the request is known
1174 * is obtained. Invoking this method will have no effect.
1186 * @param key the keyword by which the request is known (e.g., "Accept").
1194 * is obtained.
1212 * The <code>ContentHandlerFactory</code> instance is used to
1215 * If there is a security manager, this method first calls
1217 * to ensure the operation is allowed.
1369 * that property has been defined, the sun.net.www.content is always
1386 * This is a convenience method that can be used by
1390 * @return a guess as to what the content type of the object is,
1407 * of the bytes to determine the content type is often more accurate
1410 * @param is an input stream that supports marks.
1419 static public String guessContentTypeFromStream(InputStream is)
1422 if (!is.markSupported())
1425 is.mark(16);
1426 int c1 = is.read();
1427 int c2 = is.read();
1428 int c3 = is.read();
1429 int c4 = is.read();
1430 int c5 = is.read();
1431 int c6 = is.read();
1432 int c7 = is.read();
1433 int c8 = is.read();
1434 int c9 = is.read();
1435 int c10 = is.read();
1436 int c11 = is.read();
1437 int c12 = is.read();
1438 int c13 = is.read();
1439 int c14 = is.read();
1440 int c15 = is.read();
1441 int c16 = is.read();
1442 is.reset();
1552 /* Above is signature of Microsoft Structured Storage.
1556 if (checkfpx(is)) {
1570 /* I don't know if this is official but evidence
1579 * Check for FlashPix image data in InputStream is. Return true if
1584 static private boolean checkfpx(InputStream is) throws IOException {
1601 * which is found in the header at
1607 * rootEntry is in first directory)
1610 // Mark the stream so we can reset it. 0x100 is enough for the first
1612 // the offset to the root directory entry is computed. That offset
1614 is.mark(0x100);
1616 // Get the byte ordering located at 0x1E. 0xFE is Intel,
1617 // 0xFF is other
1621 if ((posn = skipForward(is, toSkip)) < toSkip) {
1622 is.reset();
1627 if (readBytes(c, 2, is) < 0) {
1628 is.reset();
1636 if (readBytes(c, 2, is) < 0) {
1637 is.reset();
1653 if ((skipped = skipForward(is, toSkip)) < toSkip) {
1654 is.reset();
1659 if (readBytes(c, 4, is) < 0) {
1660 is.reset();
1677 is.reset(); // Reset back to the beginning
1692 is.mark((int)toSkip+0x30);
1694 if ((skipForward(is, toSkip)) < toSkip) {
1695 is.reset();
1699 /* should be at beginning of ClassID, which is as follows
1703 * This is stored from Windows as long,short,short,char[8]
1711 if (readBytes(c, 16, is) < 0) {
1712 is.reset();
1723 is.reset();
1733 is.reset();
1736 is.reset();
1742 * Returns -1, If EOF is reached before len bytes are read, returns 0
1745 static private int readBytes(int c[], int len, InputStream is)
1749 if (is.read(buf, 0, len) < len) {
1763 * until either EOF is reached, or the specified
1766 static private long skipForward(InputStream is, long toSkip)
1773 eachSkip = is.skip(toSkip - skipped);
1775 // check if EOF is reached
1777 if (is.read() == -1) {