InputStream negotiateIncomingStream(Stanza streamInitiation) throws NotConnectedException { // build In-Band Bytestream request InBandBytestreamRequest request = new ByteStreamRequest(this.manager, (Open) streamInitiation); // always accept the request InBandBytestreamSession session = request.accept(); session.setCloseBothStreamsEnabled(true); return session.getInputStream(); }
InputStream negotiateIncomingStream(Packet streamInitiation) throws XMPPException { // build In-Band Bytestream request InBandBytestreamRequest request = new ByteStreamRequest(this.manager, (Open) streamInitiation); // always accept the request InBandBytestreamSession session = request.accept(); session.setCloseBothStreamsEnabled(true); return session.getInputStream(); }
public OutputStream createOutgoingStream(String streamID, String initiator, String target) throws XMPPException { InBandBytestreamSession session = this.manager.establishSession(target, streamID); session.setCloseBothStreamsEnabled(true); return session.getOutputStream(); }
public OutputStream createOutgoingStream(String streamID, String initiator, String target) throws NoResponseException, XMPPErrorException, NotConnectedException { InBandBytestreamSession session = this.manager.establishSession(target, streamID); session.setCloseBothStreamsEnabled(true); return session.getOutputStream(); }