Examples of RewindableInputStream


Examples of com.hp.hpl.jena.grddl.impl.RewindableInputStream

    }
  }

  public void read(Model model, InputStream r, String base) {
    try {
      new GRDDL(this,model,new RewindableInputStream(r,base)).go();
    } catch (IOException e) {
      failure(e);
    }
  }
View Full Code Here

Examples of com.strobecorp.kirk.RewindableInputStream

            }
        }

        @Override public ServletInputStream getInputStream() throws IOException {
            if (inputStream == null) {
                inputStream = new RewindableInputStream(super.getInputStream());
            }
            return new ServletInputStream() {
                @Override
                public long skip(long l) throws IOException {
                    return inputStream.skip(l);
View Full Code Here

Examples of nu.validator.htmlparser.rewindable.RewindableInputStream

            if (inputStream == null) {
                throw new SAXException("Both streams in InputSource were null.");
            }
            if (this.characterEncoding == null) {
                if (allowRewinding) {
                    inputStream = rewindableInputStream = new RewindableInputStream(
                            inputStream);
                }
                this.reader = new HtmlInputStreamReader(inputStream,
                        tokenizer.getErrorHandler(), tokenizer, this, heuristics);
            } else {
View Full Code Here

Examples of nu.validator.htmlparser.rewindable.RewindableInputStream

            if (inputStream == null) {
                throw new SAXException("Both streams in InputSource were null.");
            }
            if (this.characterEncoding == null) {
                if (allowRewinding) {
                    inputStream = rewindableInputStream = new RewindableInputStream(
                            inputStream);
                }
                this.reader = new HtmlInputStreamReader(inputStream,
                        tokenizer.getErrorHandler(), tokenizer, this, heuristics);
            } else {
View Full Code Here

Examples of nu.validator.htmlparser.rewindable.RewindableInputStream

            if (inputStream == null) {
                throw new SAXException("Both streams in InputSource were null.");
            }
            if (this.characterEncoding == null) {
                if (allowRewinding) {
                    inputStream = rewindableInputStream = new RewindableInputStream(
                            inputStream);
                }
                this.reader = new HtmlInputStreamReader(inputStream,
                        tokenizer.getErrorHandler(), tokenizer, this, heuristics);
            } else {
View Full Code Here

Examples of org.apache.abdera.i18n.io.RewindableInputStream

   
    @Override
    public ServletInputStream getInputStream() throws IOException {
      if (rdr != null) throw new IllegalStateException();
      if (bin == null) {
        rin = new RewindableInputStream(super.getInputStream());
        bin = new BufferedServletInputStream(rin);
      }
      return bin;
    }
View Full Code Here

Examples of org.apache.abdera.i18n.text.io.RewindableInputStream

    }

    @Test
    public void testRewindableInputStream() throws Exception {
        ByteArrayInputStream in = new ByteArrayInputStream(new byte[] {0x01, 0x02, 0x03, 0x04});
        RewindableInputStream ris = new RewindableInputStream(in);
        byte[] buf1 = new byte[4];
        byte[] buf2 = new byte[4];
        ris.read(buf1);
        ris.rewind();
        ris.read(buf2);
        for (int n = 0; n < 4; n++)
            assertEquals(buf2[n], buf1[n]);
    }
View Full Code Here

Examples of org.apache.abdera.i18n.text.io.RewindableInputStream

  }
 
  @Test
  public void testRewindableInputStream() throws Exception {
    ByteArrayInputStream in = new ByteArrayInputStream(new byte[] {0x01,0x02,0x03,0x04});
    RewindableInputStream ris = new RewindableInputStream(in);
    byte[] buf1 = new byte[4];
    byte[] buf2 = new byte[4];
    ris.read(buf1);
    ris.rewind();
    ris.read(buf2);
    for (int n = 0; n < 4; n++)
      assertEquals(buf1[n],buf2[n]);
  }
View Full Code Here

Examples of org.apache.abdera.util.io.RewindableInputStream

  @Override
  public ServletInputStream getInputStream() throws IOException {
    if (rdr != null) throw new IllegalStateException();
    if (bin == null) {
      rin = new RewindableInputStream(super.getInputStream());
      bin = new BufferedServletInputStream(rin);
    }
    return bin;
  }
View Full Code Here

Examples of org.apache.cxf.ws.rm.RewindableInputStream

                    }
                }
            }
           
            // read SOAP headers from saved input stream
            RewindableInputStream is = (RewindableInputStream)message.get(RMMessageConstants.SAVED_CONTENT);
            is.rewind();
            XMLStreamReader reader = StaxUtils.createXMLStreamReader(is, "UTF-8");
            message.getHeaders().clear();
            if (reader.getEventType() != XMLStreamConstants.START_ELEMENT
                && reader.nextTag() != XMLStreamConstants.START_ELEMENT) {
                throw new IllegalStateException("No document found");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.