Examples of FileDescriptor


Examples of java.io.FileDescriptor

    // for native call
    @SuppressWarnings("unused")
    private ServerSocketChannelImpl() throws IOException {
        super(SelectorProvider.provider());
        status = SERVER_STATUS_OPEN;
        fd = new FileDescriptor();
        impl = SocketImplProvider.getServerSocketImpl(fd);       
        socket = new ServerSocketAdapter(impl, this);
        isBound = false;
    }
View Full Code Here

Examples of java.io.FileDescriptor

    // Test for method java.io.SyncFailedException(java.lang.String)
    File f = null;
    try {
      f = new File(System.getProperty("user.dir"), "synfail.tst");
      FileOutputStream fos = new FileOutputStream(f.getPath());
      FileDescriptor fd = fos.getFD();
      fos.close();
      fd.sync();
    } catch (SyncFailedException e) {
      f.delete();
      return;
    } catch (Exception e) {
      fail("Exception during test : " + e.getMessage());
View Full Code Here

Examples of org.infinispan.protostream.descriptors.FileDescriptor

   public Map<String, FileDescriptor> parse(FileDescriptorSource fileDescriptorSource) throws IOException, DescriptorParserException {
      Map<String, ProtoFile> fileMap = parseInternal(fileDescriptorSource.getFileDescriptors());
      Map<String, FileDescriptor> fileDescriptorMap = new HashMap<>(fileMap.size());
      for (String fileName : fileMap.keySet()) {
         if (!fileDescriptorMap.containsKey(fileName)) {
            FileDescriptor mapped = new ProtofileMapper(fileMap).map(fileMap.get(fileName));
            fileDescriptorMap.put(fileName, mapped);
         }
      }
      return fileDescriptorMap;
   }
View Full Code Here

Examples of org.jnode.apps.vmware.disk.handler.FileDescriptor

    protected FileDescriptor createFileDescriptor(File file, RandomAccessFile raf)
        throws IOException, UnsupportedFormatException {
        // read 2 sectors, starting from sector number 0
        Descriptor descriptor = getDescriptorRW().read(file, 0, 2);

        return new FileDescriptor(descriptor, raf, this);
    }
View Full Code Here

Examples of org.jnode.apps.vmware.disk.handler.FileDescriptor

            for (String decl : extentDecls) {
                ExtentDeclaration extentDecl = readExtentDeclaration(decl, file);
                if (extentDecl.isMainExtent()) {
                    mainExtentDecl = extentDecl;
                } else {
                    FileDescriptor fileDescriptor =
                            IOUtils.readFileDescriptor(extentDecl.getExtentFile());

                    Extent extent = createExtent(fileDescriptor, extentDecl);
                    extents.add(extent);
                }
View Full Code Here

Examples of org.jnode.apps.vmware.disk.handler.FileDescriptor

     * @throws IOException
     * @throws UnsupportedFormatException
     */
    public static FileDescriptor readFileDescriptor(File file)
        throws IOException, UnsupportedFormatException {
        FileDescriptor fileDescriptor = null;

        for (ExtentFactory f : FACTORIES) {
            try {
                LOG.debug("trying with factory " + f.getClass().getName());
                FileDescriptor fd = f.createFileDescriptor(file);

                // we have found the factory for that format
                fileDescriptor = fd;

                break;
View Full Code Here

Examples of org.quorum.symbols.FileDescriptor

    @Override
    public CompilerFileDescriptor getFileDescriptor(FileObject file) {
        if(file != null) {
            File ioFile = org.openide.filesystems.FileUtil.toFile(file);
            //ask the virtual machine for a fileDescriptor of a different type
            FileDescriptor fd = virtualMachine.getSymbolTable().getFileDescriptor(ioFile.getAbsolutePath());
            if(fd == null && !hasBuiltAllOnce()) {//try compiling if we haven't already
                Project project = FileOwnerQuery.getOwner(file);
                compile(project);
                fd = virtualMachine.getSymbolTable().getFileDescriptor(ioFile.getAbsolutePath());
            }
View Full Code Here

Examples of org.wymiwyg.rwcf.form.FileDescriptor

      String currentParameterName = parameterNames[i];
      Object[] objects = body.getParameterObjects(currentParameterName);
      for (int j = 0; j < objects.length; j++) {
        Object currentObject = objects[j];
        if (currentObject instanceof FileDescriptor) {
          FileDescriptor currentFileDescriptor = (FileDescriptor) currentObject;
          result.put(getFileNameFromPath(currentFileDescriptor
              .getFileName()), new TypedContent(
              currentFileDescriptor.getMimeType(),
              currentFileDescriptor.getData()));
        }
      }
      /*
       * String[] fileNames = body.getFileNames(currentParameterName); if
       * ((fileNames != null) && (fileNames.length > 0)) { MimeType[]
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.