mirror of
https://github.com/hierynomus/sshj.git
synced 2025-12-06 15:20:54 +03:00
minor
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user