X-Git-Url: http://www.project-moonshot.org/gitweb/?p=shibboleth%2Fcpp-xmltooling.git;a=blobdiff_plain;f=xmltooling%2Futil%2FParserPool.cpp;h=6da2911cc534fb17485fa4194d579754f22ed9b5;hp=25e4324a7326a9a010ceb7097c08cbaaa4b82fc2;hb=bd026f07e729e66127b3efd48aee443fba815af3;hpb=6bf08ad666ef628116800af401e2b058bc67554f diff --git a/xmltooling/util/ParserPool.cpp b/xmltooling/util/ParserPool.cpp index 25e4324..6da2911 100644 --- a/xmltooling/util/ParserPool.cpp +++ b/xmltooling/util/ParserPool.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2001-2008 Internet2 + * Copyright 2001-2009 Internet2 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,6 +26,7 @@ #include "util/CurlURLInputStream.h" #include "util/NDC.h" #include "util/ParserPool.h" +#include "util/Threads.h" #include "util/XMLHelper.h" #include @@ -440,6 +441,36 @@ void ParserPool::checkinBuilder(DOMBuilder* builder) #endif +StreamInputSource::StreamInputSource(istream& is, const char* systemId) : InputSource(systemId), m_is(is) +{ +} + +BinInputStream* StreamInputSource::makeStream() const +{ + return new StreamBinInputStream(m_is); +} + +StreamInputSource::StreamBinInputStream::StreamBinInputStream(istream& is) : m_is(is), m_pos(0) +{ +} + +#ifdef XMLTOOLING_XERCESC_64BITSAFE +XMLFilePos +#else +unsigned int +#endif +StreamInputSource::StreamBinInputStream::curPos() const +{ + return m_pos; +} + +#ifdef XMLTOOLING_XERCESC_64BITSAFE +const XMLCh* StreamInputSource::StreamBinInputStream::getContentType() const +{ + return NULL; +} +#endif + xsecsize_t StreamInputSource::StreamBinInputStream::readBytes(XMLByte* const toFill, const xsecsize_t maxToRead) { XMLByte* target=toFill;