Orbits  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Pages
Public Member Functions | Public Attributes | List of all members
pip._vendor.html5lib.inputstream.HTMLBinaryInputStream Class Reference
Inheritance diagram for pip._vendor.html5lib.inputstream.HTMLBinaryInputStream:
pip._vendor.html5lib.inputstream.HTMLUnicodeInputStream _object

Public Member Functions

def __init__
 
def reset
 
def openStream
 
def detectEncoding
 
def changeEncoding
 
def detectBOM
 
def detectEncodingMeta
 
- Public Member Functions inherited from pip._vendor.html5lib.inputstream.HTMLUnicodeInputStream
def __init__
 
def reset
 
def openStream
 
def position
 
def char
 
def readChunk
 
def characterErrorsUCS4
 
def characterErrorsUCS2
 
def charsUntil
 
def unget
 

Public Attributes

 rawStream
 
 charEncoding
 
 numBytesMeta
 
 numBytesChardet
 
 defaultEncoding
 
 dataStream
 
- Public Attributes inherited from pip._vendor.html5lib.inputstream.HTMLUnicodeInputStream
 reportCharacterErrors
 
 replaceCharactersRegexp
 
 newLines
 
 charEncoding
 
 dataStream
 
 chunk
 
 chunkSize
 
 chunkOffset
 
 errors
 
 prevNumLines
 
 prevNumCols
 

Detailed Description

Provides a unicode stream of characters to the HTMLTokenizer.

This class takes care of character encoding and removing or replacing
incorrect byte-sequences and also provides column and line tracking.

Constructor & Destructor Documentation

def pip._vendor.html5lib.inputstream.HTMLBinaryInputStream.__init__ (   self,
  source,
  encoding = None,
  parseMeta = True,
  chardet = True 
)
Initialises the HTMLInputStream.

HTMLInputStream(source, [encoding]) -> Normalized stream from source
for use by html5lib.

source can be either a file-object, local filename or a string.

The optional encoding parameter must be a string that indicates
the encoding.  If specified, that encoding will be used,
regardless of any BOM or later declaration (such as in a meta
element)

parseMeta - Look for a <meta> element containing encoding information

Member Function Documentation

def pip._vendor.html5lib.inputstream.HTMLBinaryInputStream.changeEncoding (   self,
  newEncoding 
)
def pip._vendor.html5lib.inputstream.HTMLBinaryInputStream.detectBOM (   self)
Attempts to detect at BOM at the start of the stream. If
an encoding can be determined from the BOM return the name of the
encoding otherwise return None
def pip._vendor.html5lib.inputstream.HTMLBinaryInputStream.detectEncoding (   self,
  parseMeta = True,
  chardet = True 
)
def pip._vendor.html5lib.inputstream.HTMLBinaryInputStream.detectEncodingMeta (   self)
Report the encoding declared by the meta element
def pip._vendor.html5lib.inputstream.HTMLBinaryInputStream.openStream (   self,
  source 
)
Produces a file object from source.

source can be either a file object, local filename or a string.
def pip._vendor.html5lib.inputstream.HTMLBinaryInputStream.reset (   self)

Member Data Documentation

pip._vendor.html5lib.inputstream.HTMLBinaryInputStream.charEncoding
pip._vendor.html5lib.inputstream.HTMLBinaryInputStream.dataStream
pip._vendor.html5lib.inputstream.HTMLBinaryInputStream.defaultEncoding
pip._vendor.html5lib.inputstream.HTMLBinaryInputStream.numBytesChardet
pip._vendor.html5lib.inputstream.HTMLBinaryInputStream.numBytesMeta
pip._vendor.html5lib.inputstream.HTMLBinaryInputStream.rawStream

The documentation for this class was generated from the following file:

Copyright 2014 Google Inc. All rights reserved.