Examples of NullOutputStream


Examples of com.caucho.util.NullOutputStream

        }

        BytesMessageInputStream is =
          new BytesMessageInputStream((BytesMessage) message);

        NullOutputStream os = new NullOutputStream();

        Hessian2Input in = new Hessian2Input(is);
        AbstractHessianOutput out;

        SerializerFactory serializerFactory = getSerializerFactory();
View Full Code Here

Examples of com.drew.lang.NullOutputStream

    {
        try {
            throw new CompoundException("message", null);
        } catch (CompoundException e) {
            try {
                PrintStream nullStream = new PrintStream(new NullOutputStream());
                e.printStackTrace(nullStream);
                e.printStackTrace(new PrintWriter(nullStream));
            } catch (Exception e1) {
                fail("Exception during printStackTrace for CompoundException with no inner exception");
            }
View Full Code Here

Examples of com.gistlabs.mechanize.util.NullOutputStream

  protected void loadPage() throws Exception {
    preLoadContent();
  }

  protected void preLoadContent() throws IOException {
    Util.copy(getInputStream(), new NullOutputStream());
  }
View Full Code Here

Examples of com.google.common.io.NullOutputStream

   * @throws IOException
   */
  public static long getInputStreamSize(InputStream in) throws IOException
  {
    CountingInputStream cin = new CountingInputStream(in);
    ByteStreams.copy(cin, new NullOutputStream());
    return cin.getCount();
  }
View Full Code Here

Examples of com.google.common.io.NullOutputStream

    try {
      for (int i = 0; i < stms.length; i++) {
        stms[i] = fs.open(TEST_FILE);
      }
      for (InputStream stm : stms) {
        IOUtils.copyBytes(stm, new NullOutputStream(), 1024);
      }
    } finally {
      IOUtils.cleanup(null, stms);
    }
   
View Full Code Here

Examples of com.google.common.io.NullOutputStream

        for (int i = 0; i < FILE_COUNT; i++) {
            Node file = root.getNode("file" + i);
            Node content = file.getNode("jcr:content");
            InputStream stream = content.getProperty("jcr:data").getStream();
            try {
                ByteStreams.copy(stream, new NullOutputStream());
            } finally {
                stream.close();
            }
        }
    }
View Full Code Here

Examples of com.google.gwt.dev.util.NullOutputFileSet.NullOutputStream

  @Override
  public OutputStream createNewOutputStream(String path, long lastModifiedTime)
      throws IOException {
    String fullPath = pathPrefix + path;
    if (seenEntries.contains(fullPath)) {
      return new NullOutputStream();
    }
    seenEntries.add(fullPath);
    mkzipDirs(getParentPath(fullPath));

    ZipEntry zipEntry = new ZipEntry(fullPath);
View Full Code Here

Examples of edu.stanford.nlp.io.NullOutputStream

    TreePrint treePrint = op.testOptions.treePrint(op.tlpParams);
    TreebankLangParserParams tlpParams = op.tlpParams;
    TreebankLanguagePack tlp = op.langpack();
    PrintWriter pwOut, pwErr;
    if (op.testOptions.quietEvaluation) {
      NullOutputStream quiet = new NullOutputStream();
      pwOut = tlpParams.pw(quiet);
      pwErr = tlpParams.pw(quiet);
    } else {
      pwOut = tlpParams.pw();
      pwErr = tlpParams.pw(System.err);
View Full Code Here

Examples of freenet.support.io.NullOutputStream

        } else {
            // Read the file. Throw if there is a CRC error.
            // Note that java.util.zip.ZipInputStream only checks the CRC for compressed
            // files, so this is not entirely foolproof.
            long size = ze.getSize();
            FileUtil.copy(zis, new NullOutputStream(), size);
          zis.closeEntry();
        }
      }
    } finally {
      Closer.close(zis);
View Full Code Here

Examples of freenet.support.io.NullOutputStream

    RandomAccessBucket tempBucket;
    try {
      tempBucket = createBucket(bf, len, server);
    } catch (IOException e) {
      Logger.error(this, "Bucket error: "+e, e);
      FileUtil.copy(is, new NullOutputStream(), len);
      throw new MessageInvalidException(ProtocolErrorMessage.INTERNAL_ERROR, e.toString(), getIdentifier(), isGlobal());
    } catch (PersistenceDisabledException e) {
            Logger.error(this, "Bucket error: "+e, e);
            FileUtil.copy(is, new NullOutputStream(), len);
            throw new MessageInvalidException(ProtocolErrorMessage.PERSISTENCE_DISABLED, null, getIdentifier(), isGlobal());
        }
    BucketTools.copyFrom(tempBucket, is, len);
    this.bucket = tempBucket;
  }
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.