Examples of File


Examples of com.sun.java.util.jar.pack.Package.File

        byte[] buf = new byte[1<<16];
        for (int i = 0; i < numFiles; i++) {
            // %%% Use a big temp file for file bits?
            Utf8Entry name = (Utf8Entry) file_name.getRef();
            long size = fileLengths[i];
            File file = pkg.new File(name);
            file.modtime = pkg.default_modtime;
            file.options = pkg.default_options;
            if (haveModtime)
                file.modtime += file_modtime.getInt();
            if (haveOptions)
                file.options |= file_options.getInt();
            if (verbose > 1)
                Utils.log.fine("Reading "+size+" bytes of "+name.stringValue());
            long toRead = size;
            while (toRead > 0) {
                int nr = buf.length;
                if (nr > toReadnr = (int) toRead;
                nr = file_bits.getInputStream().read(buf, 0, nr);
                if (nr < 0throw new EOFException();
                file.addBytes(buf, 0, nr);
                toRead -= nr;
            }
            pkg.addFile(file);
            if (file.isClassStub()) {
                assert(file.getFileLength() == 0);
                Class cls = (Class) nextClass.next();
                cls.initFile(file);
            }
        }
View Full Code Here

Examples of com.sun.midp.io.j2me.storage.File

        info.jarUrl = location;
        info.suiteName = name;
        state.force = force;
        state.removeRMS = removeRMS;
        state.file = new File();
        state.nextStep = 5;
        state.listener = installListener;
        //state.chmanager = CHManager.getManager(null);
        state.storageId = storageId;
View Full Code Here

Examples of com.zaranux.client.java.io.File

  protected void execute(final AsyncCallback<Boolean> callback) {
    String[] args = getArgs();
    String name = args[0];
    String dir = getCurrentDirectory(); // current directory
     
    File f= new File(dir);
   
      f.mkdir(new AsyncCallback<Boolean>() {

        public void onFailure(Throwable T) {
          System.out.print( "making new directory failed.", callback );
        }
View Full Code Here

Examples of davaguine.jmac.tools.File

                System.out.print("~~~Improper Usage~~~\n\n");
                System.out.print("Usage Example: ChangeTagInfo \"c:\\1.ape\" TagName TagValue\n\n");
                return;
            }

            File in = File.createFile(args[0], "rw");
            if (!in.isLocal()) {
                System.out.print("~~~Improper Usage~~~\nThe input ape file should be local file.\n");
                return;
            }

            APEInfo apeInfo = IAPEDecompress.CreateAPEInfo(in);
View Full Code Here

Examples of de.schlichtherle.io.File

     * Sets the file to poll, which can be a directory or a file.
     *
     * @param file
     */
    public void setFile(java.io.File file) {
        this.file = new File(file);
    }
View Full Code Here

Examples of edu.hawaii.ics.csdl.jupiter.file.review.File

     
      StaxReviewXmlUtil.writeElement(writer, ELEMENT_REVIEWER_ID, reviewIssue.getReviewerId());
      StaxReviewXmlUtil.writeElement(writer, ELEMENT_ASSIGNED_TO, reviewIssue.getAssignedTo());
     
      writer.writeStartElement(ELEMENT_FILE);
      File file = reviewIssue.getFile();
      if (file.getLine() != null) {
        writer.writeAttribute(ATTRIBUTE_LINE, String.valueOf(file.getLine()));
      }
      if (file.getValue() != null) {
        writer.writeCharacters(file.getValue());
      }
      writer.writeEndElement(); // File
     
      StaxReviewXmlUtil.writeElement(writer, ELEMENT_TYPE, reviewIssue.getType());
      StaxReviewXmlUtil.writeElement(writer, ELEMENT_SEVERITY, reviewIssue.getSeverity());
View Full Code Here

Examples of edu.indiana.dlib.metsnav.mets.v1_4.File

                    if (dataStream != null) {
                        Map<String, Map<String, String>> valueMap = dataStream.getValueMap();
                        for (Map.Entry<String, Map<String, String>> entry : valueMap.entrySet()) {
                            Map<String, String> stream = new HashMap<String, String>();
                            for (Fptr fptr2: fptrs) {
                                File file = (File)fptr2.getFILEID();
                                String use = file.getUSE();
                                if (entry.getValue().get(use) != null) {
                                    stream.put(use, file.getFLocat(0).getHref());
                                }
                            }
                            metsObj.getDataStreamsMap().put(entry.getKey(), stream);
                        }
                    }                   
                }
            }

            // Now we can process logicalStruct
            for (int i = 0; i < maps.length; i++) {
                StructMap structMap = maps[i];
                Div div = structMap.getDiv();
                String type = structMap.getTYPE();
                if (MetsConstants.LOGICAL.equals(type)) {
                    Map<String, CompositeItem> cimap = new HashMap<String, CompositeItem>();               
                    metsObj.setCompositeItemMap(cimap);
                    metsObj.setDescription(div.getLABEL());
                   
                    Fptr[] fptrs = div.getFptr();
                    ParameterMap dataStream = config.getDataStream();
                    if (dataStream != null) {
                        Map<String, Map<String, String>> valueMap = dataStream.getValueMap();
                        for (Map.Entry<String, Map<String, String>> entry : valueMap.entrySet()) {
                            Map<String, String> stream = new HashMap<String, String>();
                            for (Fptr fptr2: fptrs) {
                                File file = (File)fptr2.getFILEID();
                                String use = file.getUSE();
                                if (entry.getValue().get(use) != null) {
                                    stream.put(use, file.getFLocat(0).getHref());
                                }
                            }
                            metsObj.getDataStreamsMap().put(entry.getKey(), stream);
                        }
                    }
View Full Code Here

Examples of edu.indiana.dlib.metsnav.mets.v1_5.File

        HashMap<String, String> map = new HashMap<String, String>();
        Fptr[] fptrs = pageDiv.getFptr();
        for (int i = 0; i < fptrs.length; i++) {
            Fptr fptr = fptrs[i];
            File file = (File) fptr.getFILEID();
            if (file != null) {
                FLocat locat = file.getFLocat(0);
                String group = file.getUSE();
                map.put(group, locat.getHref());
            }
        }
        page.getDataStreamsMap().put("size", map);
        page.setSequentialOrder(pageDiv.getORDER());
View Full Code Here

Examples of edu.indiana.dlib.metsnav.mets.v1_6.File

        HashMap<String, String> map = new HashMap<String, String>();
        Fptr[] fptrs = pageDiv.getFptr();
        for (int i = 0; i < fptrs.length; i++) {
            Fptr fptr = fptrs[i];
            File file = (File) fptr.getFILEID();
            if (file != null) {
                FLocat locat = file.getFLocat(0);
                String group = file.getUSE();
                map.put(group, locat.getHref());
            }
        }
        page.getDataStreamsMap().put("size", map);
        page.setSequentialOrder(pageDiv.getORDER());
View Full Code Here

Examples of evolaris.framework.blog.datamodel.File

 
  public void testCreateFolder() {
    session = HibernateSessions.startTransaction(this.getClass());
    try {
      FCKEditorManager fckMgr = new FCKEditorManager(Locale.GERMAN, session);
      File f = fckMgr.createFolder("tstblg1", "/foo/bar/images/", null);
      assertEquals("images", f.getFilename());
    } catch (Exception e) {
      HibernateSessions.rollbackTransaction(session,this.getClass());
    } finally {
      HibernateSessions.finishTransaction(session,this.getClass());
    }
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.