10
change was needed because proper URLConnection support requires infinite
10
change was needed because proper URLConnection support requires infinite
11
timeout support from transport.
11
timeout support from transport.
12
Added (un)lockWriter to FSPsession.
12
Added (un)lockWriter to FSPsession.
13
FSPOutputStream uses blocking Writer locks
14
Sourcefiles moved into net/fsp directory to match their package name
15
Sourcefiles moved into net/fsp directory to match their package name
15
and moved into src folder for easier compiling in Eclipse and Maven2
16
and moved into src folder for easier compiling in Eclipse and Maven2
38
* always uploads to temporary file no checking if client can really
38
* always uploads to temporary file no checking if client can really
39
* create/overwrite desired file is performed until end of upload.
39
* create/overwrite desired file is performed until end of upload.
40
* Custom timestamp on uploaded file is not supported by this class.
40
* Custom timestamp on uploaded file is not supported by this class.
41
* This constructor will block if there is already another active writing
42
* stream assigned to FSPsession.
42
* @param session FSPsession to target server
44
* @param session FSPsession to target server
43
* @param filename filename
45
* @param filename filename
50
this.fname=FSPutil.stringToASCIIZ(filename);
52
this.fname=FSPutil.stringToASCIIZ(filename);
51
this.bufpos = 0;
53
this.bufpos = 0;
52
this.pos = 0;
54
this.pos = 0;
55
session.lockWriter(this, true);
111
* @see FSPutil#upload(FSPsession, String, java.io.InputStream, long)
114
* @see FSPutil#upload(FSPsession, String, java.io.InputStream, long)
113
public void close() throws IOException {
116
public void close() throws IOException {
115
FSPpacket pkt;
117
FSPpacket pkt;
116
pkt = ses.interact(FSPpacket.CC_INSTALL, 0, fname, 0, fname.length, null, 0, 0);
118
try {
117
pkt.expect(FSPpacket.CC_INSTALL);
119
flush();
118
/* delete buffer so we cant write to closed file */
120
pkt = ses.interact(FSPpacket.CC_INSTALL, 0, fname, 0, fname.length, null, 0, 0);
119
fname = buf = null;
121
pkt.expect(FSPpacket.CC_INSTALL);
124
/* delete buffer so we cant write to closed file */
125
ses.unlockWriter(this);