Package com.google.enterprise.connector.util

Examples of com.google.enterprise.connector.util.InputStreamFactory


      String content = jo.getString(SpiConstants.PROPNAME_CONTENT);
      List<Value> values;
      if (Strings.isNullOrEmpty(content)) {
        values = null;
      } else {
        InputStreamFactory factory =
            InputStreamFactories.fromBase64String(content);
        jo.put(SpiConstants.PROPNAME_CONTENT, factory);
        values = ImmutableList.of(Value.getBinaryValue(factory));
      }
      mapBuilder.put(SpiConstants.PROPNAME_CONTENT, values);
View Full Code Here


  }

  /** Tests BinaryValue constructors - InputStreamFactory. */
  public void testBinaryValueInputStreamFactory() throws Exception {
    testBinaryValue(Value.getBinaryValue(
        new InputStreamFactory() {
          public InputStream getInputStream() {
            return new ByteArrayInputStream(CONTENTS_BYTES);
          }
        }));
  }
View Full Code Here

  }

  /** Tests BinaryValue constructors - InputStreamFactory. */
  public void testBinaryValueInputStreamFactoryError() throws Exception {
    BinaryValue value = (BinaryValue) Value.getBinaryValue(
        new InputStreamFactory() {
          public InputStream getInputStream() throws IOException {
            throw new IOException("Test Exception");
          }
        });

View Full Code Here

TOP

Related Classes of com.google.enterprise.connector.util.InputStreamFactory

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.