Class RequestUtils
- java.lang.Object
-
- org.hortonmachine.gears.utils.style.sld.RequestUtils
-
public class RequestUtils extends Object
Utility class performing operations related to http requests.- Author:
- Justin Deoliveira, The Open Planning Project, jdeolive@openplans.org
TODO: this class needs to be merged with org.vfny.geoserver.Requests.
-
-
Constructor Summary
Constructors Constructor Description RequestUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static BufferedReadergetBufferedXMLReader(InputStream stream, int xmlLookahead)Wraps an xml input xstream in a buffered reader specifying a lookahead that can be used to preparse some of the xml document, resetting it back to its original state for actual parsing.static BufferedReadergetBufferedXMLReader(Reader reader, int xmlLookahead)Wraps an xml reader in a buffered reader specifying a lookahead that can be used to preparse some of the xml document, resetting it back to its original state for actual parsing.
-
-
-
Method Detail
-
getBufferedXMLReader
public static BufferedReader getBufferedXMLReader(InputStream stream, int xmlLookahead) throws IOException
Wraps an xml input xstream in a buffered reader specifying a lookahead that can be used to preparse some of the xml document, resetting it back to its original state for actual parsing.- Parameters:
stream- The original xml stream.xmlLookahead- The number of bytes to support for parse. If more than this number of bytes are preparsed the stream can not be properly reset.- Returns:
- The buffered reader.
- Throws:
IOException
-
getBufferedXMLReader
public static BufferedReader getBufferedXMLReader(Reader reader, int xmlLookahead) throws IOException
Wraps an xml reader in a buffered reader specifying a lookahead that can be used to preparse some of the xml document, resetting it back to its original state for actual parsing.- Parameters:
reader- The original xml reader.xmlLookahead- The number of bytes to support for parse. If more than this number of bytes are preparsed the stream can not be properly reset.- Returns:
- The buffered reader.
- Throws:
IOException
-
-