In the case of the stream, the document is encoded using the document defined charset or the user may override the charset. Added constructors for creating a sink using a nsIOutputStream or an nsString. Removed all HTML and TEXT encoding which relied on references to ostream. Using John McMullen's platform independent streaming code in its place. :)