Examples of copyTo()


Examples of com.google.protobuf.ByteString.copyTo()

    long remaining = buffer.remaining();
    if (buffer.remaining() < 1) {
      return 0;
    }
    ByteString byteString = read(file.getFullPath(), startingPos, remaining);
    byteString.copyTo(buffer);
    int numBytesRead = byteString.size();
    if (numBytesRead <= 0) {
      numBytesRead = -1;
    }
    return numBytesRead;
View Full Code Here

Examples of com.google.typography.font.sfntly.data.WritableFontData.copyTo()

    try {
      FileOutputStream fos = new FileOutputStream(outputFile);
      WoffWriter w = new WoffWriter();
      WritableFontData woffData = w.convert(font);
      woffData.copyTo(fos);
      if (debug)
        System.out.println("WOFF File created successfully: "
            + getWOFFfilename());
    } catch (IOException e) {
      System.out
View Full Code Here

Examples of com.googlecode.jrcp.RemoteFile.copyTo()

    final String user = args[1];
    final String rFile = args[2];
    final RemoteFile remoteFile = new RemoteFile(host, user, rFile);
    if (args.length == 3) {
      // copy remote file to stdout
      remoteFile.copyTo(System.out);
    } else {
      // copy local file to remote file
      final File lFile = new File(args[3]);
      remoteFile.copyFrom(new FileInputStream(lFile), lFile.length());
    }
View Full Code Here

Examples of com.ibm.commons.util.io.ByteStreamCache.copyTo()

    ByteStreamCache bs = new ByteStreamCache();
    InputStream is = new ReaderInputStream(new StringReader(text),"utf-8");
    bs.copyFrom(is);
    resp.setContentLength((int)bs.getLength());
    OutputStream os = resp.getOutputStream();
    bs.copyTo(os);
    os.flush();
  }
}
View Full Code Here

Examples of com.medallia.spider.StaticResources.StaticResource.copyTo()

    if (staticResource != null) {
      if (staticResource.exists()) {
        res.setHeader("Content-Type", staticResource.getMimeType());
        res.setDateHeader("Date", boot.getTime());       
        HttpHeaders.addCacheForeverHeaders(res);
        staticResource.copyTo(res.getOutputStream());
      } else {
        res.sendError(404);
        log.warn("Requested resource not found: " + uri);
      }
      return true;
View Full Code Here

Examples of com.orientechnologies.orient.core.record.impl.ODocument.copyTo()

    // APPLY PROJECTIONS
    final ODocument inputDocument = (ODocument) (iRecord != null ? iRecord.getRecord() : null);

    if (iProjections.isEmpty())
      // SELECT * CASE
      inputDocument.copyTo(iValue);
    else {

      for (Entry<String, Object> projection : iProjections.entrySet()) {
        final Object v = projection.getValue();

View Full Code Here

Examples of com.persistit.Key.copyTo()

            .append((long) indexRowDef.getRowDefId())
            .append((long) index.getIndexId());

        IndexStatistics result = null;
        FDBStoreData storeData = getStore().createStoreData(session, indexStatisticsRowDef.getGroup());
        hKey.copyTo(storeData.persistitKey);
        getStore().groupKeyAndDescendantsIterator(session, storeData, true);
        while(storeData.next()) {
            if(result == null) {
                result = decodeHeader(storeData, indexStatisticsRowDef, index);
            } else {
View Full Code Here

Examples of com.persistit.KeyState.copyTo()

            adapter.getUnderlyingStore().indexIterator(adapter.getSession(), storeData,
                                                       exact, reverse);
            storeData.nudgeDir = null;
            if (saveState != null) {
                saveState.copyTo(storeData.persistitKey);
            }
            storeData.persistitKey.setEncodedSize(saveSize);
            lastKeyGen = storeData.persistitKey.getGeneration();
            itDir = dir;
        }
View Full Code Here

Examples of com.sun.enterprise.util.cluster.windows.io.WindowsRemoteFile.copyTo()

                }
                WindowsRemoteFile wrf = new WindowsRemoteFile(wrfs, loggingDir + File.separator + logFileName);

                instanceLogFile = new File(logFileDirectoryOnServer + File.separator + logFileName);

                wrf.copyTo(instanceLogFile);
            } catch (WindowsException ex) {
                throw new IOException("Unable to download instance log file from DCOM Instance Node");
            }

View Full Code Here

Examples of com.sun.media.NBA.copyTo()

               byte[] by = new byte[1];
               NBA searcher = new NBA(byte[].class,1);
               long olddata = searcher.data;
               searcher.data = i;
               searcher.size = 1;
               searcher.copyTo(by);
               searcher.data = olddata; // keep the finalizer happy
               return by[0];
          }

          public static void setMem(long i, char c) {
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.