dbertoni 2002/08/08 21:24:23
Modified: c/src/PlatformSupport StdBinInputStream.cpp
Log:
Read bytes from the stream all at once.
Revision Changes Path
1.13 +5 -19 xml-xalan/c/src/PlatformSupport/StdBinInputStream.cpp
Index: StdBinInputStream.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/PlatformSupport/StdBinInputStream.cpp,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- StdBinInputStream.cpp 28 Feb 2002 03:07:57 -0000 1.12
+++ StdBinInputStream.cpp 9 Aug 2002 04:24:23 -0000 1.13
@@ -114,24 +114,10 @@
}
else
{
- unsigned int i = 0;
-
- while(i < maxToRead)
- {
- const int ch = m_stream.get();
-
- if (ch == EOF)
- {
- break;
- }
- else
- {
- toFill[i] = XMLByte(ch);
-
- ++i;
- }
- }
-
- return i;
+#if defined(XALAN_OLD_STYLE_CASTS)
+ return m_stream.readsome((char*)toFill, maxToRead);
+#else
+ return m_stream.readsome(reinterpret_cast<char*>(toFill), maxToRead);
+#endif
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]