Examples of fileSize()


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

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

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

     */
    private byte[] getData(final String url) {
        byte[] data = new byte[0];
        try {
            final FileConnection file = (FileConnection) Connector.open(url);
            final int fileSize = (int) file.fileSize();
            data = new byte[fileSize];
            final InputStream inputStream = file.openInputStream();
            inputStream.read(data);
        } catch (final Exception e) {
            errorDialog(e.toString());
View Full Code Here

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

     */
    public VideoPlaybackScreen(final String file) {
        boolean notEmpty;
        try {
            final FileConnection fconn = (FileConnection) Connector.open(file);
            notEmpty = fconn.exists() && fconn.fileSize() > 0;
            fconn.close();
        } catch (final IOException e) {
            Dialog.alert("Exception while accessing the video filesize:\n\n"
                    + e);
            notEmpty = false;
View Full Code Here

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

                    (FileConnection) Connector.open("file://" + dbLocation
                            + DB_NAME);

            // If the file is blank, copy the pre-defined database from this
            // module to the SDCard.
            if (fileConnection.exists() && fileConnection.fileSize() == 0) {
                readAndWriteDatabaseFile(fileConnection);
            }

            // Retrieve the code signing key for the XYZ key file
            final CodeSigningKey codeSigningKey =
View Full Code Here

Examples of net.rim.device.api.io.file.ExtendedFileConnection.fileSize()

            fConnWrap = new FileConnectionWrapper( args[ 0 ].toString() );
            ExtendedFileConnection fConn = (ExtendedFileConnection) fConnWrap.getFileConnection();

            Boolean isReadonly = new Boolean( !fConn.canWrite() );
            Boolean isHidden = new Boolean( fConn.isHidden() );
            Double size = new Double( fConn.fileSize() );
            Date dateModified = new Date( fConn.lastModified() );

            int dotIndex = ( args[ 0 ].toString() ).lastIndexOf( (int) '.' );
            String fileExtension = "";
            if( dotIndex >= 0 ) {
View Full Code Here

Examples of net.yacy.document.parser.html.ImageEntry.fileSize()

            desc = ientry.alt();
            final int appcount = queryhashes.size()  * 2 -
                           removeAppearanceHashes(url.toNormalform(false, false), queryhashes).size() -
                           removeAppearanceHashes(desc, queryhashes).size();
            final long ranking = Long.MAX_VALUE - (ientry.height() + 1) * (ientry.width() + 1) * (appcount + 1);
            result.add(new MediaSnippet(ContentDomain.IMAGE, url, MimeTable.url2mime(url), desc, ientry.fileSize(), ientry.width(), ientry.height(), ranking, source));
        }
        return result;
    }

    /**
 
View Full Code Here

Examples of net.yacy.document.parser.html.ImageEntry.fileSize()

            desc = ientry.alt();
            final int appcount = queryhashes.size()  * 2 -
                           removeAppearanceHashes(url.toNormalform(false, false), queryhashes).size() -
                           removeAppearanceHashes(desc, queryhashes).size();
            final long ranking = Long.MAX_VALUE - (ientry.height() + 1) * (ientry.width() + 1) * (appcount + 1);
            result.add(new MediaSnippet(ContentDomain.IMAGE, url, Classification.url2mime(url), desc, ientry.fileSize(), ientry.width(), ientry.height(), ranking, source));
        }
        return result;
    }

    /**
 
View Full Code Here

Examples of net.yacy.search.snippet.ResultEntry.filesize()

            prop.put("content_urlhexhash", Seed.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 net.yacy.search.snippet.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
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.