16 #if !defined(XALANOUTPUTSTREAM_HEADER_GUARD_1357924680)
17 #define XALANOUTPUTSTREAM_HEADER_GUARD_1357924680
39 XALAN_CPP_NAMESPACE_BEGIN
51 enum { eDefaultBufferSize = 512u, eDefaultTranscoderBlockSize = 1024u };
68 size_type theBufferSize = eDefaultBufferSize,
69 size_type theTranscoderBlockSize = eDefaultTranscoderBlockSize,
70 bool fThrowTranscodeException =
true);
78 return m_buffer.getMemoryManager();
81 static const XalanDOMChar*
84 #if defined(XALAN_NEWLINE_IS_CRLF)
100 virtual const XalanDOMChar*
101 getNewlineString()
const;
143 assert(m_bufferSize > 0);
145 if (m_buffer.size() == m_bufferSize)
150 m_buffer.push_back(theChar);
163 assert(theBuffer != 0);
164 assert(m_buffer.empty() ==
true);
166 write(theBuffer,
length(theBuffer));
176 write(
const XalanDOMChar* theBuffer)
178 write(theBuffer,
length(theBuffer));
191 const char* theBuffer,
194 assert(theBuffer != 0);
195 assert(m_buffer.empty() ==
true);
210 const XalanDOMChar* theBuffer,
239 canTranscodeTo(UnicodeCharType theChar)
const;
260 return m_throwTranscodeException;
275 m_throwTranscodeException = flag;
303 virtual const XalanDOMChar*
310 static const XalanDOMChar m_type[];
324 virtual const XalanDOMChar*
331 static const XalanDOMChar m_type[];
344 m_encoding(other.getEncoding(),(const_cast<
XalanDOMString*>(&(other.m_encoding)))->getMemoryManager())
358 virtual const XalanDOMChar*
365 static const XalanDOMChar m_type[];
379 m_encoding(other.getEncoding(),(const_cast<
XalanDOMString*>(&(other.m_encoding)))->getMemoryManager())
424 const XalanDOMChar* theBuffer,
426 TranscodeVectorType& theDestination);
436 const char* theBuffer,
445 static const XalanDOMChar s_nlString[];
446 static const XalanDOMChar s_nlCRString[];
464 const XalanDOMChar* theBuffer,
480 bool m_throwTranscodeException;
487 XALAN_CPP_NAMESPACE_END
491 #endif // XALANOUTPUTSTREAM_HEADER_GUARD_1357924680
void flush()
Flush the stream's buffer.
Definition: XalanOutputStream.hpp:115
bool operator==(const XalanVector< Type > &theLHS, const XalanVector< Type > &theRHS)
Definition: XalanVector.hpp:1111
MemoryManagerType & getMemoryManager()
Definition: XalanOutputStream.hpp:76
virtual const XalanDOMChar * getType() const
Retrieve type of exception.
Definition: XalanOutputStream.hpp:325
void transcode(const XalanDOMChar *theBuffer, size_type theBufferLength, TranscodeVectorType &theDestination)
Transcode a wide string.
const XalanDOMString & getEncoding() const
Definition: XalanOutputStream.hpp:387
XALAN_CPP_NAMESPACE_BEGIN typedef XERCES_CPP_NAMESPACE_QUALIFIER MemoryManager MemoryManagerType
Definition: XalanMemoryManagement.hpp:39
Definition: XSLException.hpp:39
static const XalanDOMChar * defaultNewlineString()
Definition: XalanOutputStream.hpp:82
TranscodingException(const TranscodingException &other)
Definition: XalanOutputStream.hpp:404
void write(XalanDOMChar theChar)
Write a wide character to the output stream.
Definition: XalanOutputStream.hpp:141
unsigned int UnicodeCharType
Definition: XalanTranscodingServices.hpp:61
XalanOutputStream(MemoryManagerType &theManager, size_type theBufferSize=eDefaultBufferSize, size_type theTranscoderBlockSize=eDefaultTranscoderBlockSize, bool fThrowTranscodeException=true)
Constructor.
const XalanDOMString & getOutputEncoding() const
Get the output encoding for the stream.
Definition: XalanOutputStream.hpp:219
unsigned int size_type
Definition: XalanTranscodingServices.hpp:60
Definition: XalanOutputStream.hpp:397
XalanTranscodingServices::UnicodeCharType UnicodeCharType
Definition: XalanOutputStream.hpp:56
void write(char theChar)
Write a character to the output stream.
Definition: XalanOutputStream.hpp:129
Definition: XalanOutputStream.hpp:335
Definition: XalanOutputStream.hpp:314
XalanVector< char > TranscodeVectorType
Definition: XalanOutputStream.hpp:54
Definition: XalanOutputStream.hpp:370
XalanVector< XalanDOMChar > BufferType
Definition: XalanOutputStream.hpp:53
void write(const char *theBuffer)
Write a null-terminated string to the output file.
Definition: XalanOutputStream.hpp:161
Definition: XalanTranscodingServices.hpp:287
XalanTranscodingServices::size_type size_type
Definition: XalanOutputStream.hpp:55
const XalanDOMString & getEncoding() const
Definition: XalanOutputStream.hpp:352
virtual void doFlush()=0
Flush the stream.
void write(const XalanDOMChar *theBuffer)
Write a null-terminated wide string to the output file.
Definition: XalanOutputStream.hpp:176
XALAN_CPP_NAMESPACE_BEGIN typedef size_t size_type
Definition: XalanMap.hpp:44
virtual const XalanDOMChar * getType() const
Retrieve type of exception.
Definition: XalanOutputStream.hpp:359
XalanOutputStreamException(const XalanOutputStreamException &other)
Definition: XalanOutputStream.hpp:295
const XalanOutputTranscoder * getTranscoder() const
Definition: XalanOutputStream.hpp:243
Definition: XalanOutputStream.hpp:47
TranscoderInternalFailureException(const TranscoderInternalFailureException &other)
Definition: XalanOutputStream.hpp:377
void setThrowTranscodeException(bool flag)
Set the flag that indicates whether a transcoding error should throw an exception.
Definition: XalanOutputStream.hpp:273
static const XalanDOMString::size_type s_nlStringLength
Definition: XalanOutputStream.hpp:448
Definition: XalanDOMString.hpp:42
XalanDOMString::size_type length(const XalanDOMString &theString)
Get the length of a XalanDOMString.
Definition: DOMStringHelper.hpp:277
static const XalanDOMString::size_type s_nlCRStringLength
Definition: XalanOutputStream.hpp:449
Definition: XalanOutputStream.hpp:287
unsigned int size_type
Definition: XalanDOMString.hpp:53
virtual const XalanDOMChar * getType() const
Retrieve type of exception.
Definition: XalanOutputStream.hpp:304
UnsupportedEncodingException(const UnsupportedEncodingException &other)
Definition: XalanOutputStream.hpp:342
void write(const char *theBuffer, size_type theBufferLength)
Write a specified number of characters to the output stream.
Definition: XalanOutputStream.hpp:190
virtual void writeData(const char *theBuffer, size_type theBufferLength)=0
Write the data in the buffer.
bool getThrowTranscodeException() const
Set the flag that indicates whether a transcoding error should throw an exception.
Definition: XalanOutputStream.hpp:258