APIdia Launch Partner
Top Inners Fields Constructors Methods
com.sun.webkit.network

pack-priv final Class DirectoryURLConnection

extends URLConnection
Class Inheritance
Imports
java.io.ByteArrayInputStream, .ByteArrayOutputStream, .IOException, .InputStream, .PrintStream, .PushbackInputStream, java.net.URL, .URLConnection, .URLEncoder, java.util.List, .Map, java.util.regex.Matcher, .Pattern

Nested and Inner Type Summary

Modifier and TypeClass and Description
private class

Field Summary

Modifier and TypeField and Description
private String
private final boolean
private final URLConnection
private InputStream
private static final Pattern
private static final String[]
private static final int[][]
private static final Pattern[]
private static final String
private final boolean
private boolean
Inherited from java.net.URLConnection:
allowUserInteractionconnecteddoInputdoOutputifModifiedSinceurluseCaches

Constructor Summary

AccessConstructor and Description
pack-priv
DirectoryURLConnection(URLConnection con, boolean notsure)

pack-priv

Method Summary

Modifier and TypeMethod and Description
public void
connect()

Implements abstract java.net.URLConnection.connect.

Opens a communications link to the resource referenced by this URL, if such a connection has not already been established.

public String
getContentEncoding()

Overrides java.net.URLConnection.getContentEncoding.

Returns the value of the content-encoding header field.

public int
getContentLength()

Overrides java.net.URLConnection.getContentLength.

Returns the value of the content-length header field.

public String
getContentType()

Overrides java.net.URLConnection.getContentType.

Returns the value of the content-type header field.

public String
getHeaderField(String key)

Overrides java.net.URLConnection.getHeaderField.

Returns the value of the named header field.

public Map<String, List<String>>
getHeaderFields()

Overrides java.net.URLConnection.getHeaderFields.

Returns an unmodifiable Map of the header fields.

public InputStream
getInputStream()

Overrides java.net.URLConnection.getInputStream.

Returns an input stream that reads from this open connection.

Inherited from java.net.URLConnection:
addRequestPropertygetAllowUserInteractiongetConnectTimeoutgetContentgetContentgetContentLengthLonggetDategetDefaultAllowUserInteractiongetDefaultRequestPropertygetDefaultUseCachesgetDefaultUseCachesgetDoInputgetDoOutputgetExpirationgetFileNameMapgetHeaderFieldgetHeaderFieldDategetHeaderFieldIntgetHeaderFieldKeygetHeaderFieldLonggetIfModifiedSincegetLastModifiedgetOutputStreamgetPermissiongetReadTimeoutgetRequestPropertiesgetRequestPropertygetURLgetUseCachesguessContentTypeFromNameguessContentTypeFromStreamsetAllowUserInteractionsetConnectTimeoutsetContentHandlerFactorysetDefaultAllowUserInteractionsetDefaultRequestPropertysetDefaultUseCachessetDefaultUseCachessetDoInputsetDoOutputsetFileNameMapsetIfModifiedSincesetReadTimeoutsetRequestPropertysetUseCachestoString

Field Detail

dirUrlback to summary
private String dirUrl
ftpback to summary
private final boolean ftp
innerback to summary
private final URLConnection inner
insback to summary
private InputStream ins
linkpback to summary
private static final Pattern linkp
patStringsback to summary
private static final String[] patStrings
patternGroupsback to summary
private static final int[][] patternGroups
patternsback to summary
private static final Pattern[] patterns
styleSheetback to summary
private static final String styleSheet
sureback to summary
private final boolean sure
toHTMLback to summary
private boolean toHTML

Constructor Detail

DirectoryURLConnectionback to summary
pack-priv DirectoryURLConnection(URLConnection con, boolean notsure)
DirectoryURLConnectionback to summary
pack-priv DirectoryURLConnection(URLConnection con)

Method Detail

connectback to summary
public void connect() throws IOException

Implements abstract java.net.URLConnection.connect.

Doc from java.net.URLConnection.connect.

Opens a communications link to the resource referenced by this URL, if such a connection has not already been established.

If the connect method is called when the connection has already been opened (indicated by the connected field having the value true), the call is ignored.

URLConnection objects go through two phases: first they are created, then they are connected. After being created, and before being connected, various options can be specified (e.g., doInput and UseCaches). After connecting, it is an error to try to set them. Operations that depend on being connected, like getContentLength, will implicitly perform the connection, if necessary.

Annotations
@Override
Exceptions
IOException:
if an I/O error occurs while opening the connection.
getContentEncodingback to summary
public String getContentEncoding()

Overrides java.net.URLConnection.getContentEncoding.

Doc from java.net.URLConnection.getContentEncoding.

Returns the value of the content-encoding header field.

Annotations
@Override
getContentLengthback to summary
public int getContentLength()

Overrides java.net.URLConnection.getContentLength.

Doc from java.net.URLConnection.getContentLength.

Returns the value of the content-length header field.

Note

getContentLengthLong() should be preferred over this method, since it returns a long instead and is therefore more portable.

Annotations
@Override
getContentTypeback to summary
public String getContentType()

Overrides java.net.URLConnection.getContentType.

Doc from java.net.URLConnection.getContentType.

Returns the value of the content-type header field.

Annotations
@Override
getHeaderFieldback to summary
public String getHeaderField(String key)

Overrides java.net.URLConnection.getHeaderField.

Doc from java.net.URLConnection.getHeaderField.

Returns the value of the named header field.

If called on a connection that sets the same header multiple times with possibly different values, only the last value is returned.

Annotations
@Override
getHeaderFieldsback to summary
public Map<String, List<String>> getHeaderFields()

Overrides java.net.URLConnection.getHeaderFields.

Doc from java.net.URLConnection.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. This method is overridden by the subclasses of URLConnection. In the implementation of these methods, if a given key has multiple corresponding values, they must be returned in the order they were added, preserving the insertion-order.

Annotations
@Override
getInputStreamback to summary
public InputStream getInputStream() throws IOException

Overrides java.net.URLConnection.getInputStream.

Doc from java.net.URLConnection.getInputStream.

Returns an input stream that reads from this open connection. A SocketTimeoutException can be thrown when reading from the returned input stream if the read timeout expires before data is available for read.

Annotations
@Override
Exceptions
IOException:
if an I/O error occurs while creating the input stream.
com.sun.webkit.network back to summary

private final Class DirectoryURLConnection.DirectoryInputStream

extends PushbackInputStream
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final byte[]
private ByteArrayInputStream
private ByteArrayOutputStream
private boolean
private int
private PrintStream
private final StringBuffer
Inherited from java.io.PushbackInputStream:
bufpos

Constructor Summary

AccessConstructor and Description
private
DirectoryInputStream(InputStream ins, boolean guess)

Method Summary

Modifier and TypeMethod and Description
private void
private void
private void
public int
read(byte[] buf)

Overrides java.io.FilterInputStream.read.

Reads up to b.length bytes of data from this input stream into an array of bytes.

public int
read(byte[] buf, int offset, int length)

Overrides java.io.PushbackInputStream.read.

Reads up to len bytes of data from this input stream into an array of bytes.

Inherited from java.io.PushbackInputStream:
availableclosemarkmarkSupportedreadresetskiptransferTounreadunreadunread

Field Detail

bufferback to summary
private final byte[] buffer
bytesInback to summary
private ByteArrayInputStream bytesIn
bytesOutback to summary
private ByteArrayOutputStream bytesOut
endOfStreamback to summary
private boolean endOfStream
lineCountback to summary
private int lineCount
outback to summary
private PrintStream out
tmpStringback to summary
private final StringBuffer tmpString

Constructor Detail

DirectoryInputStreamback to summary
private DirectoryInputStream(InputStream ins, boolean guess)

Method Detail

endOfListback to summary
private void endOfList()
parseFileback to summary
private void parseFile(String s)
parseFTPback to summary
private void parseFTP(String s)
readback to summary
public int read(byte[] buf) throws IOException

Overrides java.io.FilterInputStream.read.

Doc from java.io.FilterInputStream.read.

Reads up to b.length bytes of data from this input stream into an array of bytes. This method blocks until some input is available.

Annotations
@Override
Exceptions
IOException:
if an I/O error occurs.
readback to summary
public int read(byte[] buf, int offset, int length) throws IOException

Overrides java.io.PushbackInputStream.read.

Doc from java.io.PushbackInputStream.read.

Reads up to len bytes of data from this input stream into an array of bytes. This method first reads any pushed-back bytes; after that, if fewer than len bytes have been read then it reads from the underlying input stream. If len is not zero, the method blocks until at least 1 byte of input is available; otherwise, no bytes are read and 0 is returned.

Annotations
@Override
Exceptions
IOException:
if this input stream has been closed by invoking its close() method, or an I/O error occurs.