Package java.io

Examples of java.io.StringBufferInputStream


            fail("Expected assertion to fail!");
        } catch (AssertionFailedError e) {
            // expecting this
        }
        try {
            assertXMLValid(new InputSource(new StringBufferInputStream(xml)));
            fail("Expected assertion to fail!");
        } catch (AssertionFailedError e) {
            // expecting this
        }
    }
View Full Code Here


            fail("Expected assertion to fail!");
        } catch (AssertionFailedError e) {
            // expecting this
        }
        try {
            assertXMLValid(new InputSource(new StringBufferInputStream(xml)),
                           systemId, doctype);
            fail("Expected assertion to fail!");
        } catch (AssertionFailedError e) {
            // expecting this
        }
View Full Code Here

  throws HTTPException
    {
  String      query = request.getQueryString() ;
  if (query == null)
      return "unknown";
  InputStream in    = new StringBufferInputStream(query) ;
  URLDecoder  d     = new URLDecoder (in, getOverrideFlag()) ;
  try {
      d.parse () ;
  } catch (URLDecoderException e) {
      Reply error = request.makeReply(HTTP.BAD_REQUEST) ;
View Full Code Here

      throws HTTPException
  {
      String      query = request.getQueryString() ;
      if (query == null)
    return null;
      InputStream in    = new StringBufferInputStream(query) ;
      URLDecoder  d     = new URLDecoder (in, getOverrideFlag()) ;
      try {
    d.parse () ;
      } catch (URLDecoderException e) {
    Reply error = request.makeReply(HTTP.BAD_REQUEST) ;
View Full Code Here

  throws InvalidLabelException
    {
  try {
      this.in = (new LineNumberInputStream
           (new BufferedInputStream
      (new StringBufferInputStream (string)))) ;

      this.buffer = new byte[32] ;
      this.ch = in.read() ;
  } catch (IOException e) {
      throw new InvalidLabelException( "IO exception.") ;
View Full Code Here

  } catch(IOException ex) {
      proc = null ;
  }

  if(proc == null)
      in = new StringBufferInputStream
    ("[exec: cannot start process: \""+cmd+"\"]") ;
  else
      in = proc.getInputStream() ;
    }
View Full Code Here

  // Check if we should handle it (is it a POST disguised in GET ?)
  if ((! getConvertGetFlag()) || ( ! request.hasState("query")))
      return super.get (request) ;
  // Get the request entity, and decode it:
  String      query = request.getQueryString() ;
  InputStream in    = new StringBufferInputStream(query) ;
  URLDecoder  d     = new URLDecoder (in, getOverrideFlag()) ;
  try {
      d.parse () ;
  } catch (URLDecoderException e) {
      Reply error = request.makeReply(HTTP.BAD_REQUEST) ;
View Full Code Here

    public Reply get(Request request)
  throws ProtocolException, ResourceException
    {
  if (getConvertGetFlag() && request.hasState("query")) {
      String      query = request.getQueryString() ;
      InputStream in    = new StringBufferInputStream(query) ;
      URLDecoder  d     = new URLDecoder (in, getOverrideFlag()) ;
      try {
    d.parse () ;
      } catch (URLDecoderException e) {
    Reply error = request.makeReply(HTTP.BAD_REQUEST) ;
View Full Code Here

    public void setContent (String msg) {
  if ( ! hasHeader(H_CONTENT_TYPE) )
      setHeaderValue(H_CONTENT_TYPE, DEFAULT_TYPE) ;
  setContentLength (msg.length()) ;
  setStream(new StringBufferInputStream(msg));
    }
View Full Code Here

             // get the string from the result.
             sw.flush();
             sw.close();
             if (bis != null)
                bis.close();
             StringBufferInputStream in = new StringBufferInputStream(
                            sw.toString());
             MessageFactory mFactory = MessageFactory.newInstance();
             SOAPMessage resMsg = mFactory.createMessage(null, in);
                 smc.setMessage(resMsg);
View Full Code Here

TOP

Related Classes of java.io.StringBufferInputStream

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.