Examples of fileSize()


Examples of ar.util.memoryMapping.BigFileByteBuffer.fileSize()

    IndexedEncoding minEntry = new IndexedEncoding(header.types, header.minimaRecordOffset, buffer);
   
    double max = Double.MIN_VALUE, min=Double.MAX_VALUE;
   
    long cursor = header.dataTableOffset;
    while(cursor < buffer.fileSize()) {
      IndexedEncoding entry = new IndexedEncoding(header.types, cursor, buffer);
      cursor += header.recordLength;
      max = Math.max(max, (Double) entry.get(0));
      min = Math.min(min, (Double) entry.get(0));
    }
View Full Code Here

Examples of de.anomic.search.ResultEntry.filesize()

            prop.put("content_urlhexhash", yacySeed.b64Hash2hexHash(resulthashString));
            prop.putHTML("content_urlname", nxTools.shortenURLString(result.urlname(), MAX_URL_LENGTH));
            prop.put("content_showDate_date", GenericFormatter.RFC1123_SHORT_FORMATTER.format(result.modified()));
            prop.put("content_date822", HeaderFramework.formatRFC1123(result.modified()));
            //prop.put("content_ybr", RankingProcess.ybr(result.hash()));
            prop.putHTML("content_size", Integer.toString(result.filesize())); // we don't use putNUM here because that number shall be usable as sorting key. To print the size, use 'sizename'
            prop.putHTML("content_sizename", sizename(result.filesize()));
            prop.putHTML("content_showSize_sizename", sizename(result.filesize()));
            prop.putHTML("content_host", resultURL.getHost() == null ? "" : resultURL.getHost());
            prop.putHTML("content_file", resultURL.getFile());
            prop.putHTML("content_path", resultURL.getPath());
View Full Code Here

Examples of de.anomic.search.ResultEntry.filesize()

            prop.putHTML("content_urlname", nxTools.shortenURLString(result.urlname(), MAX_URL_LENGTH));
            prop.put("content_showDate_date", GenericFormatter.RFC1123_SHORT_FORMATTER.format(result.modified()));
            prop.put("content_date822", HeaderFramework.formatRFC1123(result.modified()));
            //prop.put("content_ybr", RankingProcess.ybr(result.hash()));
            prop.putHTML("content_size", Integer.toString(result.filesize())); // we don't use putNUM here because that number shall be usable as sorting key. To print the size, use 'sizename'
            prop.putHTML("content_sizename", sizename(result.filesize()));
            prop.putHTML("content_showSize_sizename", sizename(result.filesize()));
            prop.putHTML("content_host", resultURL.getHost() == null ? "" : resultURL.getHost());
            prop.putHTML("content_file", resultURL.getFile());
            prop.putHTML("content_path", resultURL.getPath());
            prop.put("content_nl", (item == theQuery.offset) ? 0 : 1);
View Full Code Here

Examples of de.anomic.search.ResultEntry.filesize()

            prop.put("content_showDate_date", GenericFormatter.RFC1123_SHORT_FORMATTER.format(result.modified()));
            prop.put("content_date822", HeaderFramework.formatRFC1123(result.modified()));
            //prop.put("content_ybr", RankingProcess.ybr(result.hash()));
            prop.putHTML("content_size", Integer.toString(result.filesize())); // we don't use putNUM here because that number shall be usable as sorting key. To print the size, use 'sizename'
            prop.putHTML("content_sizename", sizename(result.filesize()));
            prop.putHTML("content_showSize_sizename", sizename(result.filesize()));
            prop.putHTML("content_host", resultURL.getHost() == null ? "" : resultURL.getHost());
            prop.putHTML("content_file", resultURL.getFile());
            prop.putHTML("content_path", resultURL.getPath());
            prop.put("content_nl", (item == theQuery.offset) ? 0 : 1);
            prop.putHTML("content_publisher", result.publisher());
View Full Code Here

Examples of javax.microedition.io.file.FileConnection.fileSize()

          String startBoundary = getStartBoundary(_fileKey, fc.getName(), _mimeType);
          String endBoundary = getEndBoundary();
         
          String params = (_params != null) ? getParameters(_params) : "";
         
          long fileSize = fc.fileSize();
          long contentLength = fileSize +
                  (long)startBoundary.length() +
                  (long)endBoundary.length() +
                  (long)params.length();
       
View Full Code Here

Examples of javax.microedition.io.file.FileConnection.fileSize()

    public StoredFileInfo getFileInfo(final String fileName) throws IOException {
        final StoredFileInfo result = new StoredFileInfo();
        final FileConnection conn = (FileConnection) Connector.open(rootPrefix + fileName);
        try {
            if (conn.exists()) {
                result.fileLength = conn.fileSize();
                final InputStream in = conn.openInputStream();
                try {
                    final byte[] data = BaseStorage.readFromInputStream(in);
                    result.fileCRC = CRC32.calculate(data);
                } finally {
View Full Code Here

Examples of javax.microedition.io.file.FileConnection.fileSize()

                    try {
                        if (options.replayMode) {
                            inputStream = Connector.openInputStream(options.replayFileName);
                            FileConnection conn = (FileConnection) Connector.open(options.replayFileName,
                                    Connector.READ);
                            gpsState.replySize = conn.fileSize();
                            gpsState.replyPosition = 0;
                            conn.close();
                        } else {
                            inputStream = Connector.openInputStream(options.gpsUrl);
                        }
View Full Code Here

Examples of javax.microedition.io.file.FileConnection.fileSize()

        }

        String name = con.getName();
        String mimeType = MIMETypeAssociations.getMIMEType( name );

        int size = (int) con.fileSize();
        byte[] data = new byte[ size ];
        DataInputStream dis = con.openDataInputStream();
        dis.read( data, 0, size );
        close( dis );
        close( con );
View Full Code Here

Examples of javax.microedition.io.file.FileConnection.fileSize()

     * is 16bit 8000hz mono
     */
    private void writeWavHeader() throws IOException {
        // Reopen the output file
        FileConnection conn = (FileConnection) Connector.open( _path, Connector.READ_WRITE );
        int size = (int) conn.fileSize();

        // use output stream as it is shown in the sample
        OutputStream o = conn.openOutputStream();

        //*********************************************************************************************************************
 
View Full Code Here

Examples of javax.microedition.io.file.FileConnection.fileSize()

            props.addCommand(backToBCommand);
            props.setCommandListener(this);

            props.append(new StringItem(T._("Location"), currDirName));
            props.append(new StringItem(T._("Type"), fc.isDirectory() ? T._("Directory") : T._("Regular File")));
            props.append(new StringItem(T._("Size"), Long.toString((fc.isDirectory() ? fc.directorySize(true) : fc.fileSize()))));
            props.append(new StringItem(T._("Modified"), myDate(fc.lastModified())));

            ChoiceGroup attrs = new ChoiceGroup(T._("Attributes"), Choice.MULTIPLE, attrList, null);
            attrs.setSelectedFlags(new boolean[] { fc.canRead(), fc.canWrite(), fc.isHidden() });
            props.append(attrs);
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.