1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2025-12-14 06:51:08 +01:00

Enable trailing whitespace checkstyle check

for all source code regions, including javadoc.
This commit is contained in:
Florian Schmaus 2018-05-09 23:06:12 +02:00
parent 9d61a6de7d
commit e8923b9d16
545 changed files with 3713 additions and 3715 deletions

View file

@ -21,14 +21,14 @@ import org.jivesoftware.smack.SmackException;
public abstract class FileTransferException extends SmackException {
/**
*
*
*/
private static final long serialVersionUID = 1L;
public static class NoStreamMethodsOfferedException extends FileTransferException {
/**
*
*
*/
private static final long serialVersionUID = 1L;
@ -37,7 +37,7 @@ public abstract class FileTransferException extends SmackException {
public static class NoAcceptableTransferMechanisms extends FileTransferException {
/**
*
*
*/
private static final long serialVersionUID = 1L;

View file

@ -19,13 +19,13 @@ package org.jivesoftware.smackx.filetransfer;
/**
* File transfers can cause several events to be raised. These events can be
* monitored through this interface.
*
*
* @author Alexander Wenckus
*/
public interface FileTransferListener {
/**
* A request to send a file has been received from another user.
*
*
* @param request
* The request from the other user.
*/

View file

@ -41,9 +41,9 @@ import org.jxmpp.jid.EntityFullJid;
* listener will notify you when there is a new file transfer request. To create
* the {@link IncomingFileTransfer} object accept the transfer, or, if the
* transfer is not desirable reject it.
*
*
* @author Alexander Wenckus
*
*
*/
public final class FileTransferManager extends Manager {
@ -64,7 +64,7 @@ public final class FileTransferManager extends Manager {
/**
* Creates a file transfer manager to initiate and receive file transfers.
*
*
* @param connection
* The XMPPConnection that the file transfers will use.
*/
@ -89,7 +89,7 @@ public final class FileTransferManager extends Manager {
/**
* Add a file transfer listener to listen to incoming file transfer
* requests.
*
*
* @param li
* The listener
* @see #removeFileTransferListener(FileTransferListener)
@ -101,7 +101,7 @@ public final class FileTransferManager extends Manager {
/**
* Removes a file transfer listener.
*
*
* @param li
* The file transfer listener to be removed
* @see FileTransferListener
@ -112,7 +112,7 @@ public final class FileTransferManager extends Manager {
/**
* Creates an OutgoingFileTransfer to send a file to another user.
*
*
* @param userID
* The fully qualified jabber ID (i.e. full JID) with resource of the user to
* send the file to.
@ -136,7 +136,7 @@ public final class FileTransferManager extends Manager {
* When the file transfer request is acceptable, this method should be
* invoked. It will create an IncomingFileTransfer which allows the
* transmission of the file to proceed.
*
*
* @param request
* The remote request that is being accepted.
* @return The IncomingFileTransfer which manages the download of the file
@ -162,7 +162,7 @@ public final class FileTransferManager extends Manager {
* </p>
* @param request
* @throws NotConnectedException
* @throws InterruptedException
* @throws InterruptedException
*/
protected void rejectIncomingFileTransfer(FileTransferRequest request) throws NotConnectedException, InterruptedException {
StreamInitiation initiation = request.getStreamInitiation();

View file

@ -182,9 +182,9 @@ public final class FileTransferNegotiator extends Manager {
* @return The file transfer object that handles the transfer
* @throws NoStreamMethodsOfferedException If there are either no stream methods contained in the packet, or
* there is not an appropriate stream method.
* @throws NotConnectedException
* @throws NoAcceptableTransferMechanisms
* @throws InterruptedException
* @throws NotConnectedException
* @throws NoAcceptableTransferMechanisms
* @throws InterruptedException
*/
public StreamNegotiator selectStreamNegotiator(
FileTransferRequest request) throws NotConnectedException, NoStreamMethodsOfferedException, NoAcceptableTransferMechanisms, InterruptedException {
@ -239,7 +239,7 @@ public final class FileTransferNegotiator extends Manager {
throw new FileTransferException.NoAcceptableTransferMechanisms();
}
if (isByteStream && isIBB) {
if (isByteStream && isIBB) {
return new FaultTolerantNegotiator(connection(),
byteStreamTransferManager,
inbandTransferManager);
@ -296,10 +296,10 @@ public final class FileTransferNegotiator extends Manager {
* user to respond. If they do not respond in time, this
* @return Returns the stream negotiator selected by the peer.
* @throws XMPPErrorException Thrown if there is an error negotiating the file transfer.
* @throws NotConnectedException
* @throws NoResponseException
* @throws NoAcceptableTransferMechanisms
* @throws InterruptedException
* @throws NotConnectedException
* @throws NoResponseException
* @throws NoAcceptableTransferMechanisms
* @throws InterruptedException
*/
public StreamNegotiator negotiateOutgoingTransfer(final Jid userID,
final String streamID, final String fileName, final long size,

View file

@ -24,9 +24,9 @@ import org.jxmpp.jid.Jid;
/**
* A request to send a file received from another user.
*
*
* @author Alexander Wenckus
*
*
*/
public class FileTransferRequest {
private final StreamInitiation streamInitiation;
@ -36,10 +36,10 @@ public class FileTransferRequest {
/**
* A receive request is constructed from the Stream Initiation request
* received from the initiator.
*
*
* @param manager
* The manager handling this file transfer
*
*
* @param si
* The Stream initiation received from the initiator.
*/
@ -50,7 +50,7 @@ public class FileTransferRequest {
/**
* Returns the name of the file.
*
*
* @return Returns the name of the file.
*/
public String getFileName() {
@ -59,7 +59,7 @@ public class FileTransferRequest {
/**
* Returns the size in bytes of the file.
*
*
* @return Returns the size in bytes of the file.
*/
public long getFileSize() {
@ -68,7 +68,7 @@ public class FileTransferRequest {
/**
* Returns the description of the file provided by the requester.
*
*
* @return Returns the description of the file provided by the requester.
*/
public String getDescription() {
@ -77,7 +77,7 @@ public class FileTransferRequest {
/**
* Returns the mime-type of the file.
*
*
* @return Returns the mime-type of the file.
*/
public String getMimeType() {
@ -87,7 +87,7 @@ public class FileTransferRequest {
/**
* Returns the fully-qualified jabber ID of the user that requested this
* file transfer.
*
*
* @return Returns the fully-qualified jabber ID of the user that requested
* this file transfer.
*/
@ -97,7 +97,7 @@ public class FileTransferRequest {
/**
* Returns the stream ID that uniquely identifies this file transfer.
*
*
* @return Returns the stream ID that uniquely identifies this file
* transfer.
*/
@ -109,7 +109,7 @@ public class FileTransferRequest {
* Returns the stream initiation stanza that was sent by the requester which
* contains the parameters of the file transfer being transfer and also the
* methods available to transfer the file.
*
*
* @return Returns the stream initiation stanza that was sent by the
* requester which contains the parameters of the file transfer
* being transfer and also the methods available to transfer the
@ -121,7 +121,7 @@ public class FileTransferRequest {
/**
* Accepts this file transfer and creates the incoming file transfer.
*
*
* @return Returns the IncomingFileTransfer on which the
* file transfer can be carried out.
*/
@ -131,8 +131,8 @@ public class FileTransferRequest {
/**
* Rejects the file transfer request.
* @throws NotConnectedException
* @throws InterruptedException
* @throws NotConnectedException
* @throws InterruptedException
*/
public void reject() throws NotConnectedException, InterruptedException {
manager.rejectIncomingFileTransfer(this);

View file

@ -38,7 +38,7 @@ import org.jxmpp.jid.Jid;
* The In-Band Bytestream file transfer method, or IBB for short, transfers the
* file over the same XML Stream used by XMPP. It is the fall-back mechanism in
* case the SOCKS5 bytestream method of transferring files is not available.
*
*
* @author Alexander Wenckus
* @author Henning Staib
* @see <a href="http://xmpp.org/extensions/xep-0047.html">XEP-0047: In-Band
@ -50,7 +50,7 @@ public class IBBTransferNegotiator extends StreamNegotiator {
/**
* The default constructor for the In-Band Bytestream Negotiator.
*
*
* @param connection The connection which this negotiator works on.
*/
protected IBBTransferNegotiator(XMPPConnection connection) {

View file

@ -74,10 +74,10 @@ public class IncomingFileTransfer extends FileTransfer {
* the negotiated stream.
*
* @return The negotiated InputStream from which to read the data.
* @throws SmackException
* @throws SmackException
* @throws XMPPErrorException If there is an error in the negotiation process an exception
* is thrown.
* @throws InterruptedException
* @throws InterruptedException
*/
public InputStream receiveFile() throws SmackException, XMPPErrorException, InterruptedException {
if (inputStream != null) {
@ -107,10 +107,10 @@ public class IncomingFileTransfer extends FileTransfer {
* <LI>{@link FileTransfer#getProgress()}</LI>
* <LI>{@link FileTransfer#isDone()}</LI>
* </UL>
*
*
* @param file The location to save the file.
* @throws SmackException when the file transfer fails
* @throws IOException
* @throws IOException
* @throws IllegalArgumentException This exception is thrown when the the provided file is
* either null, or cannot be written to.
*/

View file

@ -122,7 +122,7 @@ public class OutgoingFileTransfer extends FileTransfer {
* Thrown if an error occurs during the file transfer
* negotiation process.
* @throws SmackException if there was no response from the server.
* @throws InterruptedException
* @throws InterruptedException
*/
public synchronized OutputStream sendFile(String fileName, long fileSize,
String description) throws XMPPException, SmackException, InterruptedException {

View file

@ -37,7 +37,7 @@ import org.jxmpp.jid.Jid;
/**
* Negotiates a SOCKS5 Bytestream to be used for file transfers. The implementation is based on the
* {@link Socks5BytestreamManager} and the {@link Socks5BytestreamRequest}.
*
*
* @author Henning Staib
* @see <a href="http://xmpp.org/extensions/xep-0065.html">XEP-0065: SOCKS5 Bytestreams</a>
*/

View file

@ -152,7 +152,7 @@ public abstract class StreamNegotiator extends Manager {
* @throws XMPPErrorException If an error occurs during this process an XMPPException is
* thrown.
* @throws InterruptedException If thread is interrupted.
* @throws SmackException
* @throws SmackException
*/
public abstract InputStream createIncomingStream(StreamInitiation initiation)
throws XMPPErrorException, InterruptedException, SmackException;
@ -168,9 +168,9 @@ public abstract class StreamNegotiator extends Manager {
* @param target The fully-qualified JID of the target or receiver of the file
* transfer.
* @return The negotiated stream ready for data.
* @throws SmackException
* @throws XMPPException
* @throws InterruptedException
* @throws SmackException
* @throws XMPPException
* @throws InterruptedException
*/
public abstract OutputStream createOutgoingStream(String streamID,
Jid initiator, Jid target) throws SmackException, XMPPException, InterruptedException;