Examples of File


Examples of org.pdfclown.files.File

    java.io.File file
    )
  {
    // Open the PDF file!
    try
    {this.file = new File(file.getAbsolutePath());}
    catch(FileFormatException e)
    {throw new RuntimeException(file.getAbsolutePath() + " file has a bad file format.",e);}
    catch(Exception e)
    {throw new RuntimeException(file.getAbsolutePath() + " file access error.",e);}
View Full Code Here

Examples of org.richfaces.model.entity.File

          data = new LinkedHashMap();
          Project projectA = new Project("projectA", 10);

          Directory adir1 = new Directory("ADir1", 50);

          adir1.addFile(new File("AFile1", 60));
          adir1.addFile(new File("AFile2", 61));

          Directory adir2 = new Directory("ADir2", 101);

          projectA.addDirectory(adir1);
          projectA.addDirectory(adir2);
View Full Code Here

Examples of org.rzo.yajsw.util.File

     */
    public double getDoubleValue()
    {
      if (!isValid())
        throw new RuntimeException("Cannot find Harddisk drive " + _drive);
      File file = new File(_drive);

      switch (_infoType)
      {
      case FreeSpaceInPercent:
        return ((double) file.getFreeSpace() / (double) file.getTotalSpace()) * 100;
      case FreeSpaceInBytes:
        return file.getFreeSpace();
      case TotalSpaceinBytes:
        return file.getTotalSpace();
      case UsedSpaceInBytes:
        return file.getTotalSpace() - file.getFreeSpace();
      default:
        return -1;
      }
    }
View Full Code Here

Examples of org.sonar.api.resources.File

  @Before
  public void setUp() {
    project = TestUtils.mockProject();
    fs = TestUtils.mockFileSystem();
    context = mock(SensorContext.class);
    File resourceMock = mock(File.class);
    when(context.getResource((File) anyObject())).thenReturn(resourceMock);
  }
View Full Code Here

Examples of org.structr.dynamic.File

    try {

      if (!(fileExists(fileName, checksum))) {

        File fileNode;

        if (ImageHelper.isImageType(fileName)) {

          fileNode = createImageNode(uuid, fileName, ct, size, checksum);
        } else {

          fileNode = createFileNode(uuid, fileName, ct, size, checksum);
        }

        if (fileNode != null) {

          Folder parent = FileHelper.createFolderPath(securityContext, path);

          if (parent != null) {

            fileNode.setProperty(File.parent, parent);

          }

          if (contentType.equals("text/css")) {
View Full Code Here

Examples of org.z.lexer.grammar.File

    CommonTokenStream tokens = new CommonTokenStream(lex);

    JavaParser g = new JavaParser(tokens);
    try {
      // parse
      File f = g.run().result;
      f.setFileName(file);

      if(g.failed()) {
        throw new CompilerException("Error parsing file.");
      }
     
      // always compile imports
      for(String importName : f.getImports()) {
        parseClass(importName);
      }

      // compile Java
      {
View Full Code Here

Examples of palmed.file.File

    private void readFile( final InputStream stream ) throws IOException
    {
        final DataInputStream input = new DataInputStream( stream );
        final String path = input.readUTF();
        if( !path.equals( "" ) )
            file_ = new File( path ); // FIXME remove dependency
    }
View Full Code Here

Examples of slash.navigation.datasources.File

        if (!downloads.isEmpty())
            downloadManager.waitForCompletion(downloads);
    }

    private Download download(Fragment<File> fragment) {
        File downloadable = fragment.getDownloadable();

        List<FileAndChecksum> fragments = new ArrayList<>();
        for (Fragment otherFragments : downloadable.getFragments())
            fragments.add(new FileAndChecksum(createFile(otherFragments.getKey()), otherFragments.getLatestChecksum()));

        String uri = downloadable.getUri();
        String url = getBaseUrl() + uri;
        return downloadManager.queueForDownload(getName() + ": Elevation Data " + uri, url, Flatten,
                null, new FileAndChecksum(getDirectory(), downloadable.getLatestChecksum()), fragments);
    }
View Full Code Here

Examples of wicket.util.file.File

        {
          // TODO Auto-generated catch block
          e.printStackTrace();
        }
       
        return new FileResourceStream(new File("temp.xls"));
      }

      @Override
      protected void setHeaders(WebResponse response)
      {
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.