|
Class: URI
Object
|
+--URI
|
+--HierarchicalURI
- Package:
- stx:libbasic2
- Category:
- Net-Resources
- Version:
- rev:
1.23
date: 2019/03/18 10:03:24
- user: cg
- file: URI.st directory: libbasic2
- module: stx stc-classLibrary: libbasic2
accessing
-
attributes
-
-
classForScheme: aString
-
find a class for a given scheme name aString
usage example(s):
self classForScheme:'file'
|
-
schemes
-
answer the schemes supported by an URI-class.
Concrete subclasses redefine this to answer an array of scheme names
-
transferBufferSize
-
escape
-
escape: aString allow: additionalCharacters on: aStream
-
self escape:'0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
allow:nil on:TextCollector open
self escape:'Ein text mit blanks und @ & #'
allow:nil on:TextCollector open
-
unEscape: aStream
-
convert escape sequences to the original characters
usage example(s):
self unEscape:(self escape:' &%@ ' )
|
instance creation
-
fromString: aString
-
create an URI from a given String
usage example(s):
self fromString:''
self fromString:'file:~'
self fromString:'ftp://exept.exept.de/~stefan/bla'
self fromString:'cg@exept.exept.de:/cvs/bosch'
|
-
fromString: aString onError: exceptionBlock
-
create an URI from a given String
usage example(s):
self fromString:'' onError:nil
|
accessing
-
contents
-
-
method
-
for compatibility with outdated URL class
-
scheme
-
return primary scheme of the class.
Concrete subclasses may redefine this
-
scheme: aString
-
comparing
-
= anURI
-
-
hash
-
converting
-
asURI
-
return myself - I am an URI
printing & storing
-
printOn: aStream
-
-
publicPrintOn: aStream
-
print, but omit password information.
Subclasses which know about secret information have to redefine this
subclass responsibility
-
readStreamDo: aBlock
-
evaluate a block with the read stream as first argument
and a dictionary containing attributes as second argument.
The stream is closed after aBlock has been evaluated.
** This method raises an error - it must be redefined in concrete classes **
-
readStreamsDo: aBlock
-
evaluate the block with a Collection of streams as first argument
and a dictionary containing attributes as optional second argument,
- a collection with a stream on a single file,
- or a collection with streams on a directorie's files, but not recursive
The streams are closed after aBlock has been evaluated.
Attributes may be the mime type (key #MIME)
** This method raises an error - it must be redefined in concrete classes **
testing
-
isFileScheme
-
-
isRemote
-
return true, if this is a remote URI
|