Examples of deleteOnExit()


Examples of java.io.File.deleteOnExit()

   
    if (getInstances() != null) {
      try {
        // temp. filename
        tempFile = File.createTempFile("arffviewer", null);
        tempFile.deleteOnExit();
       
        // serialize instances
        oos = new ObjectOutputStream(new BufferedOutputStream(new FileOutputStream(tempFile)));
        oos.writeObject(getInstances());
        oos.flush();
View Full Code Here

Examples of java.io.File.deleteOnExit()

  public void addUndoPoint() throws Exception {
   
    if (m_Instances != null) {
      // create temporary file
      File tempFile = File.createTempFile("weka", SerializedInstancesLoader.FILE_EXTENSION);
      tempFile.deleteOnExit();

      ObjectOutputStream oos =
  new ObjectOutputStream(
  new BufferedOutputStream(
  new FileOutputStream(tempFile)));
View Full Code Here

Examples of java.io.File.deleteOnExit()

    if ( this.isInArchive() )
    {
      entry = this.archiveEntry() ;
      archiveStream = this.container().getInputStream( entry ) ;
      tempFile = File.createTempFile( "FLOC_", ".xtr" ) ;
      tempFile.deleteOnExit() ;
      fileStream = new FileOutputStream( tempFile ) ;
      fileUtil().copyStream( archiveStream, fileStream ) ;
      return tempFile ;
    }
    else
View Full Code Here

Examples of java.io.File.deleteOnExit()

  private void addUndoPoint() {
    try {
      Stack undo = m_mainKFPerspective.getUndoBuffer();
      File tempFile = File.createTempFile("knowledgeFlow", FILE_EXTENSION);
      tempFile.deleteOnExit();

      if(saveLayout(tempFile, m_mainKFPerspective.getCurrentTabIndex(), true)) {
        undo.push(tempFile);

        // keep no more than 20 undo points
View Full Code Here

Examples of java.io.File.deleteOnExit()

        super(name);
    }

    public void testFindValue() throws IOException, DbException {
        File tmpFile = File.createTempFile("exthash", ".tmp");
        tmpFile.deleteOnExit();
        SortedStaticHash hash = new SortedStaticHash(tmpFile, 8);
        hash.create(false);
        hash.addValue(new Key("a"), new Value("aa"));
        hash.addValue(new Key("b"), new Value("bb"));
        hash.addValue(new Key("c"), new Value("cc"));
View Full Code Here

Examples of java.io.File.deleteOnExit()

        hash.drop();
    }

    public void testFindValue_Cold() throws IOException, DbException {
        File tmpFile = File.createTempFile("exthash", ".tmp");
        tmpFile.deleteOnExit();
        SortedStaticHash hash = new SortedStaticHash(tmpFile, 8);
        hash.create(false);
        hash.addValue(new Key("a"), new Value("aa"));
        hash.addValue(new Key("b"), new Value("bb"));
        hash.addValue(new Key("c"), new Value("cc"));
View Full Code Here

Examples of java.io.File.deleteOnExit()

    private static final int REPEAT = 100000;

    public void xtestAddValue_SmallBucket8() throws IOException, DbException {
        File tmpFile = File.createTempFile("SmallBucket8", ".tmp");
        tmpFile.deleteOnExit();
        SortedStaticHash hash = new SortedStaticHash(tmpFile, 8);
        List<byte[]> list = new ArrayList<byte[]>(REPEAT);
        Random random = new Random(432542542L);
        for(int i = 0; i < REPEAT; i++) {
            String d = Double.toString(random.nextDouble());
View Full Code Here

Examples of java.io.File.deleteOnExit()

        hash.drop();
    }

    public void testAddValue_BigBucket100() throws IOException, DbException {
        File tmpFile = File.createTempFile("BigBucket100", ".tmp");
        tmpFile.deleteOnExit();
        SortedStaticHash hash = new SortedStaticHash(tmpFile, REPEAT / 100);
        hash.create(false);
        List<byte[]> list = new ArrayList<byte[]>(REPEAT);
        Random random = new Random(54552542345L);
        for(int i = 0; i < REPEAT; i++) {
View Full Code Here

Examples of java.io.File.deleteOnExit()

        hash.drop();
    }

    public void testRemoveValue() throws IOException, DbException {
        File tmpFile = File.createTempFile("RemoveValue", ".tmp");
        tmpFile.deleteOnExit();
        SortedStaticHash hash = new SortedStaticHash(tmpFile, 8);
        hash.create(false);
        hash.addValue(new Key("a"), new Value("aa"));
        hash.addValue(new Key("b"), new Value("bb"));
        hash.addValue(new Key("c"), new Value("cc"));
View Full Code Here

Examples of java.io.File.deleteOnExit()

        super(name);
    }

    public void testBplusTreeUniq() throws IOException, DbException {
        File tmpFile = File.createTempFile("btree", ".tmp");
        tmpFile.deleteOnExit();
        BTree btree = new BTree(tmpFile, false);
        btree.create(false);

        List<byte[]> list = new ArrayList<byte[]>(REPEAT);
        Random random = new Random(54552542345L);
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.