Package com.caucho.vfs

Examples of com.caucho.vfs.WriteStream.writeStream()


  throws Throwable
  {
    WriteStream s = path.openAppend();

    try {
      s.writeStream(is);
    } finally {
      s.close();
    }
  }
View Full Code Here


    WriteStream os = s.getWriteStream();
    Object obj = call.getArgObject(0, length);

    if (obj instanceof InputStream)
      os.writeStream((InputStream) obj);
    else if (obj instanceof ReadWritePair)
      os.writeStream(((ReadWritePair) obj).getReadStream());
    else
      throw new IllegalArgumentException("expected read stream at " +
           obj.getClass().getName());
View Full Code Here

    Object obj = call.getArgObject(0, length);

    if (obj instanceof InputStream)
      os.writeStream((InputStream) obj);
    else if (obj instanceof ReadWritePair)
      os.writeStream(((ReadWritePair) obj).getReadStream());
    else
      throw new IllegalArgumentException("expected read stream at " +
           obj.getClass().getName());
  }
View Full Code Here

      WriteStream os = path.openWrite();
      try {
  InputStream is = dataSource.openInputStream();

  os.writeStream(is);

  is.close();
      } finally {
  os.close();
      }
View Full Code Here

          env.addRemovePath(tmpPath);

          WriteStream os = tmpPath.openWrite();
          try {
            os.writeStream(is);
          } finally {
            os.close();
          }

          tmpName = tmpPath.getFullPath();
View Full Code Here

      if (is == null)
        return BooleanValue.FALSE;

      WriteStream out = env.getOut();

      long writeLength = out.writeStream(is.getInputStream());

      return LongValue.create(writeLength);
    } catch (IOException e) {
      throw new QuercusModuleException(e);
    }
View Full Code Here

      // Open the file
      WriteStream os = path.openWrite();

      // copy the data from the large object to the file
      os.writeStream(is);

      os.close();
      is.close();

      // Close the large object
View Full Code Here

      if (is == null)
        return BooleanValue.FALSE;

      WriteStream out = env.getOut();

      long writeLength = out.writeStream(is.getInputStream());

      return LongValue.create(writeLength);
    } catch (IOException e) {
      throw new QuercusModuleException(e);
    }
View Full Code Here

      if (_lob instanceof Blob) {
        Blob blob = (Blob) _lob;
        InputStream is = blob.getBinaryStream();
        is.skip(start);
        writeStream.writeStream(is);
        is.close();
      } else if (_lob instanceof Clob) {
        Clob clob = (Clob) _lob;
        Reader reader = clob.getCharacterStream();
        reader.skip(start);
View Full Code Here

        is.close();
      } else if (_lob instanceof Clob) {
        Clob clob = (Clob) _lob;
        Reader reader = clob.getCharacterStream();
        reader.skip(start);
        writeStream.writeStream(reader);
        reader.close();
      } else {
        writeStream.close();
        return false;
      }
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.