Package org.camunda.spin.impl.util

Examples of org.camunda.spin.impl.util.RewindableInputStream


  @SuppressWarnings("unchecked")
  public <T extends Spin<?>> T createSpinFromStream(InputStream parameter) {
    ensureNotNull("parameter", parameter);

    RewindableInputStream rewindableStream = new RewindableInputStream(parameter, READ_SIZE);

    DataFormat<T> matchingDataFormat = null;
    for (DataFormat<?> format : DataFormats.AVAILABLE_FORMATS) {
      if (format.getReader().canRead(rewindableStream)) {
        matchingDataFormat = (DataFormat<T>) format;
      }

      try {
        rewindableStream.rewind();
      } catch (IOException e) {
        throw LOG.unableToReadInputStream(e);
      }

    }
View Full Code Here

TOP

Related Classes of org.camunda.spin.impl.util.RewindableInputStream

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.