package net.pterodactylus.xdcc.data;
import java.io.OutputStream;
+import java.net.InetAddress;
import net.pterodactylus.irc.DccReceiver;
/** The name of the file being downloaded. */
private String filename;
+ /** The size of the file being downloaded. */
+ private long filesize;
+
+ /** The remote address. */
+ private InetAddress remoteAddress;
+
/** The output stream. */
private OutputStream outputStream;
}
/**
+ * Returns the size of the file.
+ *
+ * @return The size of the file
+ */
+ public long filesize() {
+ return filesize;
+ }
+
+ /**
+ * Returns the remote address to download from.
+ *
+ * @return The remote address to download from
+ */
+ public InetAddress remoteAddress() {
+ return remoteAddress;
+ }
+
+ /**
* The output stream that writes to the file.
*
* @return The output stream
}
/**
+ * Sets the size of the download.
+ *
+ * @param filesize
+ * The size of the download
+ * @return This download
+ */
+ public Download filesize(long filesize) {
+ this.filesize = filesize;
+ return this;
+ }
+
+ /**
+ * Sets the remote address of the download.
+ *
+ * @param remoteAddress
+ * The remote address of the download
+ * @return This download
+ */
+ public Download remoteAddress(InetAddress remoteAddress) {
+ this.remoteAddress = remoteAddress;
+ return this;
+ }
+
+ /**
* Sets the output stream the download is being written to
*
* @param outputStream