mirror of
https://github.com/hierynomus/sshj.git
synced 2025-12-07 07:40:55 +03:00
minor
This commit is contained in:
@@ -38,8 +38,8 @@ public class RemoteFile
|
|||||||
|
|
||||||
public FileAttributes fetchAttributes()
|
public FileAttributes fetchAttributes()
|
||||||
throws IOException {
|
throws IOException {
|
||||||
return requester.doRequest(newRequest(PacketType.FSTAT)) //
|
return requester.doRequest(newRequest(PacketType.FSTAT))
|
||||||
.ensurePacketTypeIs(PacketType.ATTRS) //
|
.ensurePacketTypeIs(PacketType.ATTRS)
|
||||||
.readFileAttributes();
|
.readFileAttributes();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -73,11 +73,10 @@ public class RemoteFile
|
|||||||
|
|
||||||
public void write(long fileOffset, byte[] data, int off, int len)
|
public void write(long fileOffset, byte[] data, int off, int len)
|
||||||
throws IOException {
|
throws IOException {
|
||||||
requester.doRequest( //
|
requester.doRequest(newRequest(PacketType.WRITE)
|
||||||
newRequest(PacketType.WRITE) //
|
.putUINT64(fileOffset)
|
||||||
.putUINT64(fileOffset) //
|
.putInt(len - off)
|
||||||
.putInt(len - off) //
|
.putRawBytes(data, off, len)
|
||||||
.putRawBytes(data, off, len) //
|
|
||||||
).ensureStatusPacketIsOK();
|
).ensureStatusPacketIsOK();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user