Examples of free()


Examples of freenet.support.api.RandomAccessBuffer.free()

   
    private void innerTestSize(long sz) throws IOException {
        RandomAccessBuffer raf = construct(sz);
        assertEquals(raf.size(), sz);
        raf.close();
        raf.free();
    }

    /** Test that we can create and free a RandomAccessBuffer of various sizes, and it returns the correct
     * size. */
    public void testSize() throws IOException {
View Full Code Here

Examples of freenet.support.io.ArrayBucket.free()

        assert(bucket.size() != 0);
        DataInputStream dis = new DataInputStream(bucket.getInputStream());
        FetchContext ctx = new FetchContext(dis);
        dis.close();
        assertTrue(ctx.equals(context));
        bucket.free();
    }

}
View Full Code Here

Examples of freenet.support.io.FileBucket.free()

          new URI("http://127.0.0.1:8888/"), null, null, null);
    } finally {
      Closer.close(inputStream);
      Closer.close(outputStream);
      inputBucket.free();
      outputBucket.free();
    }
  }

  private void throwError(String shortReason, String reason) throws DataFilterException {
    // Throw an exception
View Full Code Here

Examples of freenet.support.io.NullBucket.free()

      return;
    } finally {
      Closer.close(decompressorInput);
      Closer.close(decompressorOutput);
      inBucket.free();
      outBucket.free();
    }
    fail("did not throw expected CompressionOutputSizeException");

  }
View Full Code Here

Examples of freenet.support.io.TempBucketFactory.TempBucket.free()

        os.write(buf.clone());
        os.close();
        assertTrue(bucket.isRAMBucket());
        assertEquals(len, bucket.size());
        bucket.getInputStream().close();
        bucket.free();
        try {
            TempRandomAccessBuffer raf = (TempRandomAccessBuffer) bucket.toRandomAccessBuffer();
            fail();
        } catch (IOException e) {
            // Ok.
View Full Code Here

Examples of freenet.support.io.TempBucketFactory.TempRandomAccessBuffer.free()

        assertTrue(raf.hasMigrated());
        assertEquals(factory.getRamUsed(), 0);
        checkArrayInner(buf, raf, len, r);
        checkBucket(bucket, buf);
        raf.close();
        raf.free();
        assertFalse(f.exists());
    }
   
    public void testBucketToRAFCallTwiceArray() throws IOException {
        int len = 4095;
View Full Code Here

Examples of gri.tasks.AsyncTaskController.free()

    }
   
    Map outputs = controller.getOutputs();
   
    if (freeJob)
      controller.free();
   
    return outputs;
  }
 
  // -------------------------------------------------------- Inner Classes
View Full Code Here

Examples of io.undertow.websockets.extensions.ExtensionByteBuffer.free()

                    }
                }
            } finally {
                pooledPadding.free();
                if (extPadding != null && extPadding.hasExtra()) {
                    extPadding.free();
                }
            }
        }
        super.shutdownWrites();
    }
View Full Code Here

Examples of java.nio.ByteBuffer.free()

            renegotiateNoRequest(exchange, newAuthMode);
        } finally {
            if (free) {
                for(Pooled<ByteBuffer> buf : poolArray) {
                    if(buf != null) {
                        buf.free();
                    }
                }
            }
            if(requestResetRequired) {
                exchange.requestChannel = null;
View Full Code Here

Examples of java.sql.Array.free()

            while ( arrayResult.next() ) {
                array.append( jdbcToRuby(context, runtime, 2, baseType, arrayResult) );
            }
            return array;
        }
        finally { value.free(); }
    }

    protected IRubyObject xmlToRuby(final ThreadContext context,
        final Ruby runtime, final ResultSet resultSet, final int column)
        throws SQLException {
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.