Xalan-C++ API Reference  1.12.0
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
xalanc::XalanFileOutputStream Class Reference

#include <xalanc/PlatformSupport/XalanFileOutputStream.hpp>

Inheritance diagram for xalanc::XalanFileOutputStream:
[legend]
Collaboration diagram for xalanc::XalanFileOutputStream:
[legend]

Classes

class  XalanFileOutputStreamOpenException
 
class  XalanFileOutputStreamWriteException
 

Public Types

enum  { eDefaultBufferSize = 8192u }
 
typedef FILE * HandleType
 
- Public Types inherited from xalanc::XalanOutputStream
enum  { eDefaultBufferSize = 512u, eDefaultTranscoderBlockSize = 1024u }
 
typedef XalanVector< XalanDOMChar > BufferType
 
typedef XalanVector< char > TranscodeVectorType
 
typedef XalanTranscodingServices::size_type size_type
 

Public Member Functions

 XalanFileOutputStream (const XalanDOMString &theFileName, MemoryManager &theManager, size_type theBufferSize=eDefaultBufferSize)
 Construct an XalanFileOutputStream object. More...
 
virtual ~XalanFileOutputStream ()
 
- Public Member Functions inherited from xalanc::XalanOutputStream
 XalanOutputStream (MemoryManager &theManager, size_type theBufferSize=eDefaultBufferSize, size_type theTranscoderBlockSize=eDefaultTranscoderBlockSize, bool fThrowTranscodeException=true)
 Constructor. More...
 
virtual ~XalanOutputStream ()
 
MemoryManager & getMemoryManager ()
 
virtual void newline ()
 Write the appropriate newline character(s) to the stream. More...
 
virtual const XalanDOMChar * getNewlineString () const
 Get the string which is appropriate for inserting a line feed in the stream. More...
 
void flushBuffer ()
 Flush the stream's transcoding buffer, but do not request the implementation class to flush its buffer. More...
 
void flush ()
 Flush the stream's buffer. More...
 
void write (char theChar)
 Write a character to the output stream. More...
 
void write (XalanDOMChar theChar)
 Write a wide character to the output stream. More...
 
void write (const char *theBuffer)
 Write a null-terminated string to the output file. More...
 
void write (const XalanDOMChar *theBuffer)
 Write a null-terminated wide string to the output file. More...
 
void write (const char *theBuffer, size_type theBufferLength)
 Write a specified number of characters to the output stream. More...
 
void write (const XalanDOMChar *theBuffer, size_type theBufferLength)
 Write a specified number of characters to the output stream. More...
 
const XalanDOMStringgetOutputEncoding () const
 Get the output encoding for the stream. More...
 
void setOutputEncoding (const XalanDOMString &theEncoding)
 Set the output encoding for the stream. More...
 
bool canTranscodeTo (XalanUnicodeChar theChar) const
 Determine if a given value can be represented in the output encoding. More...
 
const XalanOutputTranscodergetTranscoder () const
 
bool getThrowTranscodeException () const
 Set the flag that indicates whether a transcoding error should throw an exception. More...
 
void setThrowTranscodeException (bool flag)
 Set the flag that indicates whether a transcoding error should throw an exception. More...
 
void setBufferSize (size_type theBufferSize)
 Set the size of the output buffer. More...
 

Static Public Member Functions

static XalanFileOutputStreamcreate (const XalanDOMString &theFileName, MemoryManager &theManager, size_type theBufferSize=eDefaultBufferSize)
 
- Static Public Member Functions inherited from xalanc::XalanOutputStream
static const XalanDOMChar * defaultNewlineString ()
 
static XalanDOMStringformatMessage (const XalanDOMString &theMessage, int theErrorCode, XalanDOMString &theBuffer)
 

Protected Member Functions

virtual void writeData (const char *theBuffer, size_type theBufferLength)
 Write the data in the buffer. More...
 
virtual void doFlush ()
 Flush the stream. More...
 
- Protected Member Functions inherited from xalanc::XalanOutputStream
void transcode (const XalanDOMChar *theBuffer, size_type theBufferLength, TranscodeVectorType &theDestination)
 Transcode a wide string. More...
 

Additional Inherited Members

- Static Protected Attributes inherited from xalanc::XalanOutputStream
static const XalanDOMChar s_nlString []
 
static const XalanDOMChar s_nlCRString []
 
static const XalanDOMString::size_type s_nlStringLength
 
static const XalanDOMString::size_type s_nlCRStringLength
 

Detailed Description

Definition at line 46 of file XalanFileOutputStream.hpp.

Member Typedef Documentation

◆ HandleType

Definition at line 55 of file XalanFileOutputStream.hpp.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
eDefaultBufferSize 

Definition at line 50 of file XalanFileOutputStream.hpp.

Constructor & Destructor Documentation

◆ XalanFileOutputStream()

xalanc::XalanFileOutputStream::XalanFileOutputStream ( const XalanDOMString theFileName,
MemoryManager &  theManager,
size_type  theBufferSize = eDefaultBufferSize 
)

Construct an XalanFileOutputStream object.

Parameters
theFileNamename of file
theBufferSizeThe size of the transcoding buffer

◆ ~XalanFileOutputStream()

virtual xalanc::XalanFileOutputStream::~XalanFileOutputStream ( )
virtual

Member Function Documentation

◆ create()

static XalanFileOutputStream* xalanc::XalanFileOutputStream::create ( const XalanDOMString theFileName,
MemoryManager &  theManager,
size_type  theBufferSize = eDefaultBufferSize 
)
static

◆ doFlush()

virtual void xalanc::XalanFileOutputStream::doFlush ( )
protectedvirtual

Flush the stream.

Implements xalanc::XalanOutputStream.

◆ writeData()

virtual void xalanc::XalanFileOutputStream::writeData ( const char *  theBuffer,
size_type  theBufferLength 
)
protectedvirtual

Write the data in the buffer.

Parameters
theBufferThe data to write
theBufferLengthThe length of theBuffer.

Implements xalanc::XalanOutputStream.


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