#include <IOAccessor.h>
Inheritance diagram for Core::IOAccessor:
Public Member Functions | |
virtual String * | className (void) const |
Answer receiver class name. | |
virtual void | close (void) abstract |
virtual long | bufferSize (void) |
virtual void | commit (void) |
virtual long | dataSize (void) |
virtual LineEndConvention | lineEndConvention (void) |
virtual int | readInto (ByteArray *buffer) |
virtual int | readInto (ByteArray *buffer, long startIndex, long count) abstract |
virtual int | writeFrom (ByteArray *buffer) |
virtual int | writeFrom (ByteArray *buffer, long startIndex, long count) abstract |
virtual int | writeForSureFrom (ByteArray *buffer, long startIndex, long count) |
virtual void | seekTo (long position) abstract |
virtual void | readWait (void) |
virtual void | writeWait (void) |
virtual ExternalReadStream * | readStream (void) |
virtual ExternalReadAppendStream * | readAppendStream (void) |
virtual ExternalWriteStream * | writeStream (void) |
virtual ExternalEncodedStreamFactory * | withEncoding (String *encoding) |
virtual ExternalEncodedStreamFactory * | withEncoding (const char *encoding) |
virtual void | changeDescriptorTo (int fd) |
Duplicates file descriptor to given number and then closes original one. | |
virtual bool | isSeekable (void) |
|
Reimplemented in Net::SocketAccessor, and OS::MessageQueue. Definition at line 41 of file IOAccessor.cc. Referenced by Core::IOBuffer::IOBuffer(), and Tools::Filename::privateCopy(). 00042 {
00043 return 4096;
00044 }
|
|
Duplicates file descriptor to given number and then closes original one.
In fact it calls Reimplemented in Core::FileAccessor. Definition at line 124 of file IOAccessor.cc. References Core::Object::shouldNotImplement(). 00125 { 00126 shouldNotImplement(__PRETTY_FUNCTION__); 00127 }
|
|
Answer receiver class name. Because there isn't any standard way to obtain class name this method comes to place. Every class should rewrite this method but many didn't (yet). Reimplemented from Core::Object. Reimplemented in Core::FileAccessor, Net::SocketAccessor, and OS::UnixPipe. Definition at line 35 of file IOAccessor.cc. 00036 { 00037 return new String("IOAccessor"); 00038 }
|
|
Reimplemented in Core::FileAccessor, Net::SocketAccessor, OS::MessageQueue, and OS::UnixPipe. Referenced by Core::ExternalWriteStream::closeConnection(), and Core::ExternalStream::closeConnection(). |
|
Reimplemented in Core::FileAccessor. Definition at line 46 of file IOAccessor.cc. Referenced by Core::IOBuffer::commit(). 00047 {
00048 /* Does nothing */
00049 }
|
|
Reimplemented in Core::FileAccessor. Definition at line 51 of file IOAccessor.cc. Referenced by Core::ExternalStream::contents(), Core::ExternalWriteStream::size(), and Core::ExternalWriteStream::writePosition(). 00052 {
00053 return 0;
00054 }
|
|
Reimplemented in Core::FileAccessor. Definition at line 130 of file IOAccessor.cc. Referenced by Core::IOBuffer::isSeekable(). 00131 { 00132 return false; 00133 }
|
|
Reimplemented in Core::FileAccessor. Definition at line 56 of file IOAccessor.cc. References Core::LineEndTransparent. 00057 { 00058 return LineEndTransparent; 00059 }
|
|
Definition at line 103 of file IOAccessor.cc. Referenced by Tools::Filename::readAppendStream(), and Core::ExternalEncodedStreamFactory::readAppendStream(). 00104 { 00105 return new ExternalReadAppendStream(this); 00106 }
|
|
Reimplemented in Core::FileAccessor, Net::SocketAccessor, OS::MessageQueue, and OS::UnixPipe. |
|
Reimplemented in Core::FileAccessor, Net::SocketAccessor, and OS::UnixPipe. Definition at line 62 of file IOAccessor.cc. References Core::ByteArray::size(). Referenced by Core::IOBuffer::readBufferStartingAt(), and Core::FileAccessor::readInto().
|
|
Reimplemented in OS::UnixPipe. Definition at line 98 of file IOAccessor.cc. Referenced by OS::UnixPipe::readStream(), and Core::ExternalEncodedStreamFactory::readStream(). 00099 { 00100 return new ExternalReadStream(this); 00101 }
|
|
Reimplemented in Net::SocketAccessor. Definition at line 87 of file IOAccessor.cc. 00088 {
00089 /* Does nothing */
00090 }
|
|
Reimplemented in Core::FileAccessor, Net::SocketAccessor, OS::MessageQueue, and OS::UnixPipe. Referenced by Core::IOBuffer::readPositionAndSetOffset(). |
|
Definition at line 118 of file IOAccessor.cc. References withEncoding(). 00119 { 00120 return withEncoding(new String(encoding)); 00121 }
|
|
Definition at line 113 of file IOAccessor.cc. Referenced by Core::ByteCharacterEncoder::loadFromFile(), and withEncoding(). 00114 { 00115 return new ExternalEncodedStreamFactory(this, encoding); 00116 }
|
|
Definition at line 72 of file IOAccessor.cc. References writeFrom(). Referenced by Core::IOBuffer::flushBufferUpTo(). 00073 { 00074 long start = startIndex; 00075 long total = 0; 00076 long result; 00077 00078 while (total < count) { 00079 result = writeFrom(buffer, start, count - total); 00080 start += result; 00081 total += result; 00082 } 00083 return total; 00084 }
|
|
Reimplemented in Core::FileAccessor, Net::SocketAccessor, OS::MessageQueue, and OS::UnixPipe. |
|
Reimplemented in Core::FileAccessor, Net::SocketAccessor, and OS::UnixPipe. Definition at line 67 of file IOAccessor.cc. References Core::ByteArray::size(). Referenced by writeForSureFrom(), and Core::FileAccessor::writeFrom().
|
|
Reimplemented in OS::UnixPipe. Definition at line 108 of file IOAccessor.cc. Referenced by Tools::Filename::appendStream(), OS::UnixPipe::writeStream(), and Core::ExternalEncodedStreamFactory::writeStream(). 00109 { 00110 return new ExternalWriteStream(this); 00111 }
|
|
Reimplemented in Net::SocketAccessor. Definition at line 92 of file IOAccessor.cc. 00093 {
00094 /* Does nothing */
00095 }
|