import typing

import java
import java.io
import java.lang
import org.w3c.dom

class DOMImplementationLS(java.lang.Object):
    MODE_ASYNCHRONOUS: typing.ClassVar[int] = ...
    MODE_SYNCHRONOUS: typing.ClassVar[int] = ...
    def createLSInput(self) -> LSInput: ...
    def createLSOutput(self) -> LSOutput: ...
    def createLSParser(self, arg1: int | java.jshort | java.lang.Short, arg2: str | java.lang.String, /) -> LSParser: ...
    def createLSSerializer(self) -> LSSerializer: ...

class LSException(java.lang.RuntimeException):
    PARSE_ERR: typing.ClassVar[int] = ...
    SERIALIZE_ERR: typing.ClassVar[int] = ...
    code: int = ...
    def __init__(self, code: int | java.jshort | java.lang.Short, message: str | java.lang.String, /) -> None: ...

class LSInput(java.lang.Object):
    def getBaseURI(self) -> str: ...
    def getByteStream(self) -> java.io.InputStream: ...
    def getCertifiedText(self) -> bool: ...
    def getCharacterStream(self) -> java.io.Reader: ...
    def getEncoding(self) -> str: ...
    def getPublicId(self) -> str: ...
    def getStringData(self) -> str: ...
    def getSystemId(self) -> str: ...
    def setBaseURI(self, arg1: str | java.lang.String, /) -> None: ...
    def setByteStream(self, arg1: java.io.InputStream, /) -> None: ...
    def setCertifiedText(self, arg1: bool | java.jboolean | java.lang.Boolean, /) -> None: ...
    def setCharacterStream(self, arg1: java.io.Reader, /) -> None: ...
    def setEncoding(self, arg1: str | java.lang.String, /) -> None: ...
    def setPublicId(self, arg1: str | java.lang.String, /) -> None: ...
    def setStringData(self, arg1: str | java.lang.String, /) -> None: ...
    def setSystemId(self, arg1: str | java.lang.String, /) -> None: ...

class LSOutput(java.lang.Object):
    def getByteStream(self) -> java.io.OutputStream: ...
    def getCharacterStream(self) -> java.io.Writer: ...
    def getEncoding(self) -> str: ...
    def getSystemId(self) -> str: ...
    def setByteStream(self, arg1: java.io.OutputStream, /) -> None: ...
    def setCharacterStream(self, arg1: java.io.Writer, /) -> None: ...
    def setEncoding(self, arg1: str | java.lang.String, /) -> None: ...
    def setSystemId(self, arg1: str | java.lang.String, /) -> None: ...

class LSParser(java.lang.Object):
    ACTION_APPEND_AS_CHILDREN: typing.ClassVar[int] = ...
    ACTION_INSERT_AFTER: typing.ClassVar[int] = ...
    ACTION_INSERT_BEFORE: typing.ClassVar[int] = ...
    ACTION_REPLACE: typing.ClassVar[int] = ...
    ACTION_REPLACE_CHILDREN: typing.ClassVar[int] = ...
    def abort(self) -> None: ...
    def getAsync(self) -> bool: ...
    def getBusy(self) -> bool: ...
    def getDomConfig(self) -> org.w3c.dom.DOMConfiguration: ...
    def getFilter(self) -> LSParserFilter: ...
    def parse(self, arg1: LSInput, /) -> org.w3c.dom.Document: ...
    def parseURI(self, arg1: str | java.lang.String, /) -> org.w3c.dom.Document: ...
    def parseWithContext(self, arg1: LSInput, arg2: org.w3c.dom.Node, arg3: int | java.jshort | java.lang.Short, /) -> org.w3c.dom.Node: ...
    def setFilter(self, arg1: LSParserFilter, /) -> None: ...

class LSParserFilter(java.lang.Object):
    FILTER_ACCEPT: typing.ClassVar[int] = ...
    FILTER_INTERRUPT: typing.ClassVar[int] = ...
    FILTER_REJECT: typing.ClassVar[int] = ...
    FILTER_SKIP: typing.ClassVar[int] = ...
    def acceptNode(self, arg1: org.w3c.dom.Node, /) -> int: ...
    def getWhatToShow(self) -> int: ...
    def startElement(self, arg1: org.w3c.dom.Element, /) -> int: ...

class LSResourceResolver(java.lang.Object):
    def resolveResource(self, arg1: str | java.lang.String, arg2: str | java.lang.String, arg3: str | java.lang.String, arg4: str | java.lang.String, arg5: str | java.lang.String, /) -> LSInput: ...

class LSSerializer(java.lang.Object):
    def getDomConfig(self) -> org.w3c.dom.DOMConfiguration: ...
    def getNewLine(self) -> str: ...
    def setNewLine(self, arg1: str | java.lang.String, /) -> None: ...
    def write(self, arg1: org.w3c.dom.Node, arg2: LSOutput, /) -> bool: ...
    def writeToString(self, arg1: org.w3c.dom.Node, /) -> str: ...
    def writeToURI(self, arg1: org.w3c.dom.Node, arg2: str | java.lang.String, /) -> bool: ...
