Examples of writeToStream()


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

      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

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

      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

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

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

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

    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

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

        try {
          ReadStream is = ts.openRead();

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

Examples of com.khorn.terraincontrol.configuration.ConfigProvider.writeToStream()

            DataOutputStream stream = new DataOutputStream(outputStream);

            try
            {
                stream.writeInt(PluginStandardValues.ProtocolVersion);
                configs.writeToStream(stream);
                stream.flush();
            } catch (IOException e)
            {
                TerrainControl.printStackTrace(LogMarker.FATAL, e);
            }
View Full Code Here

Examples of com.khorn.terraincontrol.configuration.ConfigProvider.writeToStream()

        ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
        DataOutputStream stream = new DataOutputStream(outputStream);
        try
        {
            stream.writeInt(PluginStandardValues.ProtocolVersion);
            configs.writeToStream(stream);
        } catch (IOException e)
        {
            TerrainControl.printStackTrace(LogMarker.FATAL, e);
        }
View Full Code Here

Examples of com.webobjects.foundation.NSData.writeToStream()

        String filename = (String) request.formValueForKey(dropTargetID() + ".filename");
        FileOutputStream os = null;
        try {
          File uploadedFile = File.createTempFile("DragAndDropUpload-", ".tmp");
          os = new FileOutputStream(uploadedFile);
          data.writeToStream(os);
          ERAttachment upload = ERAttachmentProcessor.processorForType(storageType()).process(editingContext(), uploadedFile, filename, mimetype, configurationName(), null);
          setValueForBinding(upload, "attachment");
          invokeAction = true;
          FileUtils.deleteQuietly(uploadedFile);
        } catch (IOException e) {
View Full Code Here

Examples of com.webobjects.foundation.NSData.writeToStream()

    }
    else if (key instanceof NSData) {
      NSData data = (NSData) key;
      dos.writeByte(ERXRemoteSynchronizer.DATA_TYPE);
      dos.writeByte(data.length());
      data.writeToStream(dos);
    }
    else if (key instanceof String) {
      String str = (String)key;
      dos.writeByte(ERXRemoteSynchronizer.STRING_TYPE);
      dos.writeUTF(str);
View Full Code Here

Examples of com.webobjects.foundation.NSData.writeToStream()

        psFile.deleteOnExit();
        NSMutableArray<String> array = new NSMutableArray<String>(pdftops, "-expand", tempFile.getPath(), psFile.getPath());
        if (duplex()) {
          array.add(1, "-duplex");
        }
        content.writeToStream(new FileOutputStream(tempFile));
        Process process = Runtime.getRuntime().exec(array.toArray(new String[array.size()]));
        process.waitFor();
        NSData data = new NSData(new FileInputStream(psFile), 4096);
        String header = response.headerForKey("content-disposition");
        response.setHeader(header.replace(".pdf", ".ps"), "content-disposition");
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.