public Request(PacketType type, long reqID) { super(type); this.type = type; this.reqID = reqID; putUInt32(reqID); }
protected Promise<Response, SFTPException> asyncRead(long fileOffset, int len) throws IOException { return requester.request(newRequest(PacketType.READ).putUInt64(fileOffset).putUInt32(len)); }
public RemoteFile open(String path, Set<OpenMode> modes, FileAttributes fa) throws IOException { final byte[] handle = doRequest( newRequest(PacketType.OPEN).putString(path, sub.getRemoteCharset()).putUInt32(OpenMode.toMask(modes)).putFileAttributes(fa) ).ensurePacketTypeIs(PacketType.HANDLE).readBytes(); return new RemoteFile(this, path, handle); }
public Request(PacketType type, long reqID) { super(type); this.type = type; this.reqID = reqID; putUInt32(reqID); }
public Request(PacketType type, long reqID) { super(type); this.type = type; this.reqID = reqID; putUInt32(reqID); }
protected Promise<Response, SFTPException> asyncRead(long fileOffset, int len) throws IOException { return requester.request(newRequest(PacketType.READ).putUInt64(fileOffset).putUInt32(len)); }
protected Promise<Response, SFTPException> asyncRead(long fileOffset, int len) throws IOException { return requester.request(newRequest(PacketType.READ).putUInt64(fileOffset).putUInt32(len)); }
protected Promise<Response, SFTPException> asyncWrite(long fileOffset, byte[] data, int off, int len) throws IOException { return requester.request(newRequest(PacketType.WRITE) .putUInt64(fileOffset) .putUInt32(len - off) .putRawBytes(data, off, len) ); }
public RemoteFile open(String path, Set<OpenMode> modes, FileAttributes fa) throws IOException { final String handle = doRequest( newRequest(PacketType.OPEN).putString(path).putUInt32(OpenMode.toMask(modes)).putFileAttributes(fa) ).ensurePacketTypeIs(PacketType.HANDLE).readString(); return new RemoteFile(this, path, handle); }
public RemoteFile open(String path, Set<OpenMode> modes, FileAttributes fa) throws IOException { final byte[] handle = doRequest( newRequest(PacketType.OPEN).putString(path, sub.getRemoteCharset()).putUInt32(OpenMode.toMask(modes)).putFileAttributes(fa) ).ensurePacketTypeIs(PacketType.HANDLE).readBytes(); return new RemoteFile(this, path, handle); }