PackageDescription: URIResources

URI Resources

Last published: November 28, 2007 by 'michael'

Defines 19 Classes
Extends 17 Classes

This package provides the API interface for accessing resources from a URI resource. You can ask any URI whether you can read from or write to that resource identity or location. This is done with the isReadable and isWriteable protocol.

After determining if you can use the resource to read or write, you can use the following APIs to do just that.

myURI getReadStreamDo: [:binaryReadStream :encodedStream :mediaType :hasChanged | ... ]

myURI getWriteStreamDo: [:binaryWriteStream | ... ]

Note that the streams are always binary streams and the mediaType is a MediaType object. The implementations for HTTP reading and writing can be found in the URIResources-HTTP package.

A higher level API can be used to access URI readable resources as objects, by calling #getResource.

To get an XML document off the internet:
'' asURI getResource

To get a PNG image off the internet:
'' asURI getResource

This package can use ImageReaders and/or WinGDIPlusInterface when dealing with images