[ 
https://issues.apache.org/jira/browse/SSHD-1101?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17226504#comment-17226504
 ] 

Lyor Goldstein commented on SSHD-1101:
--------------------------------------

These are  2 totally separate APIs with entirely different use-cases:

*  The buffer API is _low-level_ - it represents packets exchanged over the SSH 
connection. These packets have no special semantics and depend on the actual 
sub-protocol to be correctly handled - e.g., AUTH, SCP, SFTP, SHELL,  etc.

* The {{ScpFileOpener}} is a +high-level+ API that is invoked as a result of 
decoding packets - in these case by the SCP command handler.

Furthermore, specifically for SCP I don't see how these 2 are related since SCP 
is not a packet based protocol, so I fail to see how you would need access to 
the low-level API

> Getting  org.apache.sshd.common.util.buffer.Buffer object in custom 
> ScpFileOpener class
> ---------------------------------------------------------------------------------------
>
>                 Key: SSHD-1101
>                 URL: https://issues.apache.org/jira/browse/SSHD-1101
>             Project: MINA SSHD
>          Issue Type: Question
>            Reporter: Susmit Sarkar
>            Priority: Blocker
>
> Hello Team,
> I am a bit stuck, need your guidance. I want information like
> long offset = buffer.getLong();
> int length = buffer.getInt();
> buffer.array(), buffer.rpos(), buffer.available(), buffer.getString()
> All this are present in buffer object from 
> org.apache.sshd.common.util.buffer.Buffer, but in my CustomSCPFileOpener 
> which implements ScpFileOpener I have this methods:
> *@Override public OutputStream openWrite(Session session, Path file, long 
> size, Set<PosixFilePermission> permissions, OpenOption... options) throws 
> IOException* 
> *@Override public InputStream openRead(Session session, Path file, long size, 
> Set<PosixFilePermission> permissions, OpenOption... options) throws 
> IOException* 
> Can you please help me out how will i fecth the above details as i need to 
> invoke an external API which needs the parameters stated above
> Regards,
> Susmit
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to