eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'XML::StreamWrapper':

Home

Documentation
www.exept.de
Everywhere
for:
[back]

Class: StreamWrapper (in XML)


Inheritance:

   Object
   |
   +--Link
      |
      +--XML::StreamWrapper

Package:
stx:goodies/xml/vw
Category:
XML-VW-Parsing
Version:
rev: 1.39 date: 2023/10/23 15:29:44
user: stefan
file: StreamWrapper.st directory: goodies/xml/vw
module: stx stc-classLibrary: vw

Description:


This class is used by the XMLParser to wrap both internal and external streams with proper encoding before handing them to the parser for processing

Instance Variables:
	stream                  <EncodedStream>  stream being wrapped
	isInternal              <Boolean>  true if the stream is internal and hencer doesn't need careful line-end treatment
	protocol                        <String>  name of stream type, 'internal' or 'file'
	name                    <String | nil>  the name of the stream, if it is named
	usedAsExternal  <Boolean>  flag used to override protocol and say how stream is being used?
	entity                  <Entity | nil>  if wrapping on behalf of an Entity this is it?
	cr                              <Character>  cache of Character cr
	lf                              <Character>  cache of Character lf


Class protocol:

instance creation
o  emptyWithExtraSpace: space

o  stream: str protocol: key name: value entity: entity


Instance protocol:

accessing
o  characterSize: aCharacter
return the number of bytes required to encode aCharacter

o  checkEncoding
Look for UTF-8 or UTF-16 BOM and set the encoded stream accordingly.

o  close

o  column

o  column: something

o  entity

o  line

o  line: something

o  name

o  protocol

o  stream

declaration
o  encodingDeclIn: aParser
ok, the stream is already unicode or decoding to unicode, so ignore the encoding: directive

o  expected: string

o  mustFind: str errorOn: aParser

o  quotedString

o  sdDeclIn: aParser

o  skipIf: str

o  skipSpaceIn: aParser

o  textDeclIn: aParser

o  versionInfoIn: aParser

o  xmlDeclIn: aParser
Modified (format): / 23-02-2022 / 00:42:39 / cg

initialization
o  stream: str protocol: key name: value entity: ent

o  usedAsExternal

o  usedAsExternal: aBoolean

private
o  error: aStringOrMessage
(comment from inherited method)
Raise an error with error message aString.
The error is reported by raising the Error exception,
which is non-proceedable.
If no handler has been setup, a debugger is entered.

streaming
o  nextFor: aParser
@Commented by Stefan Vogel at: 2023-10-23 17:14 Reason: ascii is never 0 here - see above

o  skip: count

testing
o  atEnd



ST/X 7.7.0.0; WebServer 1.702 at 20f6060372b9.unknown:8081; Sat, 21 Dec 2024 17:14:30 GMT