Package org.apache.clerezza.utils

Examples of org.apache.clerezza.utils.ReplacingOutputStream


      String targetBaseUri) {
    try {
      //here we should locate some mediaType specific handlers
      //a quick hack
      final ByteArrayOutputStream resultWriter = new ByteArrayOutputStream(variant.length + 1000);
      final OutputStream out = new ReplacingOutputStream(resultWriter,
            baseUri.getBytes(UTF8),
            targetBaseUri.getBytes(UTF8));
      out.write(variant);
      out.close();
      return resultWriter.toByteArray();
    } catch (IOException ex) {
      throw new RuntimeException(ex);
    }
  }
View Full Code Here


      //here we should locate some mediaType specific handlers
      //a quick hack
      final ByteArrayOutputStream resultWriter = new ByteArrayOutputStream(variant.length + 1000);
      OutputStream out = resultWriter;
      for (String rootLinkIndicator : rootLinkIndicators) {
        out = new ReplacingOutputStream(out,
            (rootLinkIndicator + "/").getBytes(UTF8),
            (rootLinkIndicator + rootLinkPrefix + "/").getBytes(UTF8));
      }
      out.write(variant);
      out.close();
View Full Code Here

TOP

Related Classes of org.apache.clerezza.utils.ReplacingOutputStream

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.