# eric6.Helpviewer.FlashCookieManager.FlashCookieReader

Module implementing a class to read flash cookies.

### Global Attributes

None

### Classes

FlashCookieReader | Class implementing a reader for flash cookies (*.sol files).
FlashCookieReaderError | Class containing data of a reader error.

### Functions

None

## FlashCookieReader

Class implementing a reader for flash cookies (*.sol files).

### Derived from

object

### Class Attributes

Boolean
EpochCorrectionMsecs
Null
Number
ObjArr
ObjCc
ObjDate
ObjM
ObjObj
ObjXml
String
Undef

### Class Methods

None

### Methods

FlashCookieReader | Constructor
__parseArray | Private method to parse an array.
__parseBoolean | Private method to parse a boolean.
__parseDate | Private method to parse a date.
__parseNull | Private method to parse a null object.
__parseNumber | Private method to parse a number.
__parseObject | Private method to parse an object.
__parseOcc | Private method to parse a c_object.
__parseOjm | Private method to parse an m_object.
__parseString | Private method to parse a string.
__parseUndefined | Private method to parse an undefined object.
__parseXml | Private method to parse XML.
parse | Public method to parse the sol file.
setBytes | Public method to set the contents of a sol file to be parsed.
setFile | Public method to set an open sol file to be parsed.
setFileName | Public method to set the name of a sol file to be parsed.
toString | Public method to convert the parsed cookie to a string representation.

### Static Methods

None

#### FlashCookieReader (Constructor)

FlashCookieReader()

Constructor

#### FlashCookieReader.__parseArray

__parseArray(variableName, parent)

Private method to parse an array.

variableName (str)
  name of the variable to be parsed
parent (dict)
  reference to the dictionary to insert the result into

Raises FlashCookieReaderError:
  raised when an issue with the cookie file is found

#### FlashCookieReader.__parseBoolean

__parseBoolean(variableName, parent)

Private method to parse a boolean.

variableName (str)
  name of the variable to be parsed
parent (dict)
  reference to the dictionary to insert the result into

#### FlashCookieReader.__parseDate

__parseDate(variableName, parent)

Private method to parse a date.

variableName (str)
  name of the variable to be parsed
parent (dict)
  reference to the dictionary to insert the result into

#### FlashCookieReader.__parseNull

__parseNull(variableName, parent)

Private method to parse a null object.

variableName (str)
  name of the variable to be parsed
parent (dict)
  reference to the dictionary to insert the result into

#### FlashCookieReader.__parseNumber

__parseNumber(variableName, parent)

Private method to parse a number.

variableName (str)
  name of the variable to be parsed
parent (dict)
  reference to the dictionary to insert the result into

#### FlashCookieReader.__parseObject

__parseObject(variableName, parent)

Private method to parse an object.

variableName (str)
  name of the variable to be parsed
parent (dict)
  reference to the dictionary to insert the result into

Raises FlashCookieReaderError:
  raised when an issue with the cookie file is found

#### FlashCookieReader.__parseOcc

__parseOcc(variableName, parent)

Private method to parse a c_object.

variableName (str)
  name of the variable to be parsed
parent (dict)
  reference to the dictionary to insert the result into

Raises FlashCookieReaderError:
  raised when an issue with the cookie file is found

#### FlashCookieReader.__parseOjm

__parseOjm(variableName, parent)

Private method to parse an m_object.

variableName (str)
  name of the variable to be parsed
parent (dict)
  reference to the dictionary to insert the result into

#### FlashCookieReader.__parseString

__parseString(variableName, parent)

Private method to parse a string.

variableName (str)
  name of the variable to be parsed
parent (dict)
  reference to the dictionary to insert the result into

#### FlashCookieReader.__parseUndefined

__parseUndefined(variableName, parent)

Private method to parse an undefined object.

variableName (str)
  name of the variable to be parsed
parent (dict)
  reference to the dictionary to insert the result into

#### FlashCookieReader.__parseXml

__parseXml(variableName, parent)

Private method to parse XML.

variableName (str)
  name of the variable to be parsed
parent (dict)
  reference to the dictionary to insert the result into

#### FlashCookieReader.parse

parse()

Public method to parse the sol file.

Raises FlashCookieReaderError:
  raised when encountering a parse issue

#### FlashCookieReader.setBytes

setBytes(solData)

Public method to set the contents of a sol file to be parsed.

solData (bytes)
  contents of the file

#### FlashCookieReader.setFile

setFile(solFile)

Public method to set an open sol file to be parsed.

solFile (io.FileIO)
  sol file to be parsed

#### FlashCookieReader.setFileName

setFileName(solFilename)

Public method to set the name of a sol file to be parsed.

solFilename (str)
  name of the sol file

#### FlashCookieReader.toString

toString(indent=0, parent=None)

Public method to convert the parsed cookie to a string representation.

indent (int)
  indentation level
parent (dict)
  reference to the dictionary to be converted

Returns:
  string representation of the cookie

Return Type:
  str

Up

## FlashCookieReaderError

Class containing data of a reader error.

### Derived from

Exception

### Class Attributes

None

### Class Methods

None

### Methods

FlashCookieReaderError | Constructor

### Static Methods

None

#### FlashCookieReaderError (Constructor)

FlashCookieReaderError(msg)

Constructor

msg (str)
  error message

Up