1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
|
//Auto-generated by kalyptus. DO NOT EDIT.
package org.kde.koala;
import org.kde.qt.Qt;
import org.kde.qt.TQMetaObject;
import org.kde.qt.QtSupport;
import org.kde.qt.TQObject;
/**
Erase a file in a way that makes recovery impossible -- well, no guarentee
of that, but at least as difficult as reasonably possible.
For this, KShred write several times over the
existing file, using different patterns, before deleting it.
See {@link KShredSignals} for signals emitted by KShred
@author David Faure <faure@kde.org> (integration into KDE and progress signal)
@short
*/
public class KShred extends TQObject {
protected KShred(Class dummy){super((Class) null);}
public native TQMetaObject metaObject();
public native String className();
/**
Initialize the class using the name of the file to 'shred'.
@param fileName fully qualified name of the file to shred.
@short Initialize the class using the name of the file to 'shred'.
*/
public KShred(String fileName) {
super((Class) null);
newKShred(fileName);
}
private native void newKShred(String fileName);
/**
Writes all 1's over the entire file and flushes the file buffers.
@return true on success, false on error (invalid filename or write error)
@short Writes all 1's over the entire file and flushes the file buffers.
*/
public native boolean fill1s();
/**
Writes all 0's over the entire file and flushes the file buffers.
@return true on success, false on error (invalid filename or write error)
@short Writes all 0's over the entire file and flushes the file buffers.
*/
public native boolean fill0s();
/**
Writes the specified byte over the entire file and flushes the file buffers.
@param byte the value to write over every byte of the file
@return true on success, false on error (invalid filename or write error)
@short Writes the specified byte over the entire file and flushes the file buffers.
*/
public native boolean fillbyte(int arg1);
/**
Writes random bites over the entire file and flushes the file buffers.
@return true on success, false on error (invalid filename or write error)
@short Writes random bites over the entire file and flushes the file buffers.
*/
public native boolean fillrandom();
/**
Writes the specified byte array over the entire file and flushes the file buffers.
@param pattern the value to write over the entire file
@param size the length of the 'pattern' byte array
@return true on success, false on error (invalid filename or write error)
@short Writes the specified byte array over the entire file and flushes the file buffers.
*/
public native boolean fillpattern(short pattern, int size);
/**
Shreds a file by writing a series of values over it (uses
#fill0s, then fill1s, then fillrandom, then
fillbyte with 0101..., then fillbyte with 1010....
@return true on success, false on error (invalid filename or write error)
@short Shreds a file by writing a series of values over it (uses #fill0s, then fill1s, then fillrandom, then fillbyte with 0101.
*/
public native boolean shred();
/**
The simplest method to shred a file.
No need to create an instance of the class.
@param fileName fully qualified name of the file to shred.
@short The simplest method to shred a file.
*/
public static native boolean shred(String fileName);
/** Deletes the wrapped C++ instance */
protected native void finalize() throws InternalError;
/** Delete the wrapped C++ instance ahead of finalize() */
public native void dispose();
/** Has the wrapped C++ instance been deleted? */
public native boolean isDisposed();
}
|