This commit is contained in:
Shikhar Bhushan
2010-05-22 00:34:47 +01:00
parent 12c79dc2b2
commit 0c28deab88

View File

@@ -38,8 +38,8 @@ public class RemoteFile
public FileAttributes fetchAttributes()
throws IOException {
return requester.doRequest(newRequest(PacketType.FSTAT)) //
.ensurePacketTypeIs(PacketType.ATTRS) //
return requester.doRequest(newRequest(PacketType.FSTAT))
.ensurePacketTypeIs(PacketType.ATTRS)
.readFileAttributes();
}
@@ -73,11 +73,10 @@ public class RemoteFile
public void write(long fileOffset, byte[] data, int off, int len)
throws IOException {
requester.doRequest( //
newRequest(PacketType.WRITE) //
.putUINT64(fileOffset) //
.putInt(len - off) //
.putRawBytes(data, off, len) //
requester.doRequest(newRequest(PacketType.WRITE)
.putUINT64(fileOffset)
.putInt(len - off)
.putRawBytes(data, off, len)
).ensureStatusPacketIsOK();
}