Package com.caucho.vfs

Examples of com.caucho.vfs.ReadStream.writeToStream()


    OutputStream os = res.getOutputStream();
    InputStream is = _path.openRead(pathInfo, req, app);
    ReadStream rs = Vfs.openRead(is);
    try {
      rs.writeToStream(os);
    } finally {
      rs.close();
    }
  }
View Full Code Here


      try {
        is = cache.getPath().openRead();
        is.skip(first);

        os = res.getOutputStream();
        is.writeToStream(os, (int) (last - first + 1));
      } finally {
        if (is != null)
          is.close();
      }
View Full Code Here

      try {
        hasStatus = parseHeaders(req, res, rs);

        OutputStream out = res.getOutputStream();

        rs.writeToStream(out);
      } finally {
        try {
          rs.close();
        } catch (Throwable e) {
          log.log(Level.FINER, e.toString(), e);
View Full Code Here

        try {
          ReadStream is = ts.openRead();

          try {
            is.writeToStream(_os);
          } finally {
            is.close();
          }
        } catch (IOException e) {
          e.printStackTrace();
View Full Code Here

    throws IOException
  {
    ReadStream stream = path.openRead();
   
    try {
      stream.writeToStream(os);
    } finally {
      stream.close();
    }
  }
View Full Code Here

    int len;

    Object obj = call.getArgObject(0, length);
    if (obj instanceof ReadStream) {
      ReadStream is = (ReadStream) obj;
      is.writeToStream(os);
    }
    else if (obj instanceof ReadWritePair) {
      ((ReadWritePair) obj).getReadStream().writeToStream(os);
    }
    else if (obj instanceof InputStream) {
View Full Code Here

    OutputStream os = res.getOutputStream();
    InputStream is = _path.openRead(pathInfo, req, app);
    ReadStream rs = Vfs.openRead(is);
    try {
      rs.writeToStream(os);
    } finally {
      rs.close();
    }
  }
View Full Code Here

      try {
  hasStatus = parseHeaders(req, res, rs);

  OutputStream out = res.getOutputStream();

  rs.writeToStream(out);
      } finally {
  try {
    rs.close();
  } catch (Throwable e) {
    log.log(Level.FINER, e.toString(), e);
View Full Code Here

      try {
        is = cache.getPath().openRead();
        is.skip(first);

        os = res.getOutputStream();
        is.writeToStream(os, (int) (last - first + 1));
      } finally {
        if (is != null)
          is.close();
      }
View Full Code Here

    throws IOException
  {
    ReadStream stream = path.openRead();
   
    try {
      stream.writeToStream(os);
    } finally {
      stream.close();
    }
  }
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.