Examples of XmlFeed


Examples of com.google.enterprise.connector.pusher.XmlFeed

    checkACISReadByte(new ByteArrayInputStream(CONTENT.getBytes()), CONTENT);
  }

  /** Returns a new XmlFeed */
  private XmlFeed newFeed() throws IOException {
    return new XmlFeed("test", FeedType.CONTENT, new FileSizeLimitInfo(),
                       null, new MockFeedConnection());
  }
View Full Code Here

Examples of com.google.enterprise.connector.pusher.XmlFeed

   * Check the AlternateContentInputStream single byte read() produces the
   * correct results.
   */
  private void checkACISReadByte(InputStream source, InputStream alt,
      String expectedResult) throws Exception {
    XmlFeed feed = newFeed();
    feed.reset(0);
    feed.write(PREFIX.getBytes());
    InputStream is = new AlternateContentFilterInputStream(source, alt, feed);
    assertFalse(is.markSupported());
    for (int ch; (ch = is.read()) != -1; feed.write(ch)) ;
    feed.write(SUFFIX.getBytes());
    assertEquals(PREFIX + expectedResult + SUFFIX, feed.toString());
  }
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.