[Fb-contrib-commit] SF.net SVN: fb-contrib:[1453] trunk/fb-contrib/samples/WNG_Sample.java
Brought to you by:
dbrosius
|
From: <dbr...@us...> - 2010-01-09 17:28:00
|
Revision: 1453
http://fb-contrib.svn.sourceforge.net/fb-contrib/?rev=1453&view=rev
Author: dbrosius
Date: 2010-01-09 17:27:53 +0000 (Sat, 09 Jan 2010)
Log Message:
-----------
more tests
Modified Paths:
--------------
trunk/fb-contrib/samples/WNG_Sample.java
Modified: trunk/fb-contrib/samples/WNG_Sample.java
===================================================================
--- trunk/fb-contrib/samples/WNG_Sample.java 2010-01-09 04:54:06 UTC (rev 1452)
+++ trunk/fb-contrib/samples/WNG_Sample.java 2010-01-09 17:27:53 UTC (rev 1453)
@@ -1,8 +1,13 @@
+import java.io.File;
+
public class WNG_Sample
{
+ private static byte[] EMPTY_BYTE_ARRAY = new byte[0];
private Object f1 = null;
private Object f2 = null;
+ private File file = null;
+ private byte[] buffer = null;
public String badWNGFields()
{
@@ -57,4 +62,12 @@
throw new IllegalArgumentException("o1/o2 can not be null");
}
}
+
+ public void discard() {
+ if (file != null) {
+ file.delete();
+ } else if (buffer != null) {
+ buffer = EMPTY_BYTE_ARRAY;
+ }
+ }
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|