18#if !defined(XALANOUTPUTSTREAM_HEADER_GUARD_1357924680)
19#define XALANOUTPUTSTREAM_HEADER_GUARD_1357924680
45class XalanOutputTranscoder;
68 MemoryManager& theManager,
71 bool fThrowTranscodeException =
true);
79 return m_buffer.getMemoryManager();
82 static const XalanDOMChar*
85#if defined(XALAN_NEWLINE_IS_CRLF)
101 virtual const XalanDOMChar*
144 assert(m_bufferSize > 0);
146 if (m_buffer.size() == m_bufferSize)
151 m_buffer.push_back(theChar);
164 assert(theBuffer != 0);
165 assert(m_buffer.empty() ==
true);
177 write(
const XalanDOMChar* theBuffer)
192 const char* theBuffer,
195 assert(theBuffer != 0);
196 assert(m_buffer.empty() ==
true);
211 const XalanDOMChar* theBuffer,
261 return m_throwTranscodeException;
276 m_throwTranscodeException = flag;
294 MemoryManager& theManager,
295 const Locator* theLocator);
299 MemoryManager& theManager);
306 virtual const XalanDOMChar*
319 const Locator* theLocator);
342 virtual const XalanDOMChar*
357 const Locator* theLocator);
368 virtual const XalanDOMChar*
388 const Locator* theLocator);
398 virtual const XalanDOMChar*
419 const XalanDOMChar* theBuffer,
431 const char* theBuffer,
459 const XalanDOMChar* theBuffer,
475 bool m_throwTranscodeException;
#define XALAN_CPP_NAMESPACE
XSLException(const XalanDOMString &theMessage, MemoryManager &theManager, const Locator *theLocator)
Constructor.
MemoryManager & m_memoryManager
virtual ~TranscoderInternalFailureException()
virtual const XalanDOMChar * getType() const
Retrieve type of exception.
TranscoderInternalFailureException(const TranscoderInternalFailureException &other)
const XalanDOMString & getEncoding() const
TranscoderInternalFailureException(const XalanDOMString &theEncoding, XalanDOMString &theBuffer, const Locator *theLocator)
TranscoderInternalFailureException(const XalanDOMString &theEncoding, XalanDOMString &theBuffer)
TranscodingException(XalanDOMString &theBuffer, const Locator *theLocator)
TranscodingException(const TranscodingException &other)
virtual ~TranscodingException()
virtual const XalanDOMChar * getType() const
Retrieve type of exception.
TranscodingException(XalanDOMString &theBuffer)
UnsupportedEncodingException(const XalanDOMString &theEncoding, XalanDOMString &theBuffer, const Locator *theLocator)
UnsupportedEncodingException(const XalanDOMString &theEncoding, XalanDOMString &theBuffer)
UnsupportedEncodingException(const UnsupportedEncodingException &other)
const XalanDOMString & getEncoding() const
virtual ~UnsupportedEncodingException()
virtual const XalanDOMChar * getType() const
Retrieve type of exception.
XalanOutputStreamException(const XalanDOMString &theMessage, MemoryManager &theManager)
XalanOutputStreamException(const XalanDOMString &theMessage, MemoryManager &theManager, const Locator *theLocator)
virtual const XalanDOMChar * getType() const
Retrieve type of exception.
virtual ~XalanOutputStreamException()
XalanOutputStreamException(const XalanOutputStreamException &other)
void write(char theChar)
Write a character to the output stream.
void write(const XalanDOMChar *theBuffer, size_type theBufferLength)
Write a specified number of characters to the output stream.
void transcode(const XalanDOMChar *theBuffer, size_type theBufferLength, TranscodeVectorType &theDestination)
Transcode a wide string.
static const XalanDOMChar * defaultNewlineString()
void setOutputEncoding(const XalanDOMString &theEncoding)
Set the output encoding for the stream.
const XalanDOMString & getOutputEncoding() const
Get the output encoding for the stream.
const XalanOutputTranscoder * getTranscoder() const
MemoryManager & getMemoryManager()
static const XalanDOMChar s_nlString[]
XalanVector< char > TranscodeVectorType
virtual void doFlush()=0
Flush the stream.
XalanTranscodingServices::size_type size_type
bool canTranscodeTo(XalanUnicodeChar theChar) const
Determine if a given value can be represented in the output encoding.
bool getThrowTranscodeException() const
Set the flag that indicates whether a transcoding error should throw an exception.
virtual void writeData(const char *theBuffer, size_type theBufferLength)=0
Write the data in the buffer.
XalanOutputStream(MemoryManager &theManager, size_type theBufferSize=eDefaultBufferSize, size_type theTranscoderBlockSize=eDefaultTranscoderBlockSize, bool fThrowTranscodeException=true)
Constructor.
static XalanDOMString & formatMessage(const XalanDOMString &theMessage, int theErrorCode, XalanDOMString &theBuffer)
static const XalanDOMString::size_type s_nlStringLength
void setBufferSize(size_type theBufferSize)
Set the size of the output buffer.
void write(const char *theBuffer, size_type theBufferLength)
Write a specified number of characters to the output stream.
void write(const XalanDOMChar *theBuffer)
Write a null-terminated wide string to the output file.
void write(XalanDOMChar theChar)
Write a wide character to the output stream.
@ eDefaultTranscoderBlockSize
void flush()
Flush the stream's buffer.
virtual const XalanDOMChar * getNewlineString() const
Get the string which is appropriate for inserting a line feed in the stream.
void write(const char *theBuffer)
Write a null-terminated string to the output file.
void flushBuffer()
Flush the stream's transcoding buffer, but do not request the implementation class to flush its buffe...
static const XalanDOMChar s_nlCRString[]
XalanVector< XalanDOMChar > BufferType
void setThrowTranscodeException(bool flag)
Set the flag that indicates whether a transcoding error should throw an exception.
static const XalanDOMString::size_type s_nlCRStringLength
virtual void newline()
Write the appropriate newline character(s) to the stream.
virtual ~XalanOutputStream()
XalanDOMString::size_type length(const XalanDOMString &theString)
Get the length of a XalanDOMString.