org.basex.io
Class IOUrl

java.lang.Object
  extended by org.basex.io.IO
      extended by org.basex.io.IOUrl

public final class IOUrl
extends IO

IO reference, representing a URL.

Author:
BaseX Team 2005-14, BSD License, Christian Gruen

Field Summary
 
Fields inherited from class org.basex.io.IO
BASEXSUFFIX, BLOCKSIZE, BXSSUFFIX, CSVSUFFIX, ENTRIES, FILEPREF, GZSUFFIX, HTMLSUFFIXES, JARSUFFIX, JSONSUFFIX, LOGSUFFIX, MAXATTS, NODEPOWER, NODESIZE, OFFCOMP, OFFNUM, RAW, TARGZSUFFIX, TARSUFFIX, TGZSUFFIX, TXTSUFFIXES, XARSUFFIX, XMLSUFFIX, XMLSUFFIXES, XQMSUFFIX, XQSUFFIX, XQSUFFIXES, XSLSUFFIXES, ZIPSUFFIX, ZIPSUFFIXES
 
Constructor Summary
IOUrl(java.lang.String u)
          Constructor.
 
Method Summary
 java.net.URLConnection connection()
          Returns a connection to the URL.
 java.lang.String dirPath()
          Returns the directory path.
 org.xml.sax.InputSource inputSource()
          Returns an input source.
 java.io.InputStream inputStream()
          Returns an input stream.
static boolean isFileURL(java.lang.String s)
          Checks if the specified string is a valid file URI.
 IO merge(java.lang.String f)
          Merges two paths.
 byte[] read()
          Returns the binary contents.
 javax.xml.transform.stream.StreamSource streamSource()
          Returns a stream source.
 
Methods inherited from class org.basex.io.IO
dbname, eq, exists, get, hasSuffix, isArchive, isDir, length, length, name, name, path, string, timeStamp, toString, url
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IOUrl

public IOUrl(java.lang.String u)
Constructor.

Parameters:
u - url
Method Detail

read

public byte[] read()
            throws java.io.IOException
Description copied from class: IO
Returns the binary contents.

Specified by:
read in class IO
Returns:
binary contents
Throws:
java.io.IOException - I/O exception

inputSource

public org.xml.sax.InputSource inputSource()
Description copied from class: IO
Returns an input source.

Specified by:
inputSource in class IO
Returns:
input source

streamSource

public javax.xml.transform.stream.StreamSource streamSource()
Description copied from class: IO
Returns a stream source.

Specified by:
streamSource in class IO
Returns:
stream source

inputStream

public java.io.InputStream inputStream()
                                throws java.io.IOException
Description copied from class: IO
Returns an input stream.

Specified by:
inputStream in class IO
Returns:
input stream
Throws:
java.io.IOException - I/O exception

connection

public java.net.URLConnection connection()
                                  throws java.io.IOException
Returns a connection to the URL.

Returns:
connection
Throws:
java.io.IOException - I/O exception

dirPath

public java.lang.String dirPath()
Description copied from class: IO
Returns the directory path.

Overrides:
dirPath in class IO
Returns:
chopped filename

merge

public IO merge(java.lang.String f)
Description copied from class: IO
Merges two paths. Returns the new specified path for IOContent and IOStream instances.

Overrides:
merge in class IO
Parameters:
f - name/path to be appended
Returns:
resulting reference

isFileURL

public static boolean isFileURL(java.lang.String s)
Checks if the specified string is a valid file URI.

Parameters:
s - source
Returns:
result of check