Skip to content
This repository was archived by the owner on Feb 25, 2024. It is now read-only.

Commit 55effbd

Browse files
committed
Hotfixed missing generics
1 parent d75457d commit 55effbd

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/main/java/de/kaleidox/vban/VBAN.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@
2828
/**
2929
* Facade class for interacting with the API.
3030
*
31-
* @param <D> Generic-type for the
31+
* @param <T> Generic-type for the
3232
*/
33-
public class VBAN<D> extends OutputStream {
33+
public class VBAN<T> extends OutputStream {
3434
public static final int DEFAULT_PORT = 6980;
3535
private final InetAddress address;
3636
private final int port;
37-
private Factory<VBANPacket> packetFactory;
37+
private Factory<VBANPacket<T>> packetFactory;
3838
private DatagramSocket socket;
3939
private byte[] buf = new byte[0];
4040
private boolean closed = false;
@@ -48,7 +48,7 @@ public class VBAN<D> extends OutputStream {
4848
*
4949
* @throws SocketException See {@link DatagramSocket} constructor.
5050
*/
51-
private VBAN(Factory<VBANPacket> packetFactory, InetAddress address, int port) throws SocketException {
51+
private VBAN(Factory<VBANPacket<T>> packetFactory, InetAddress address, int port) throws SocketException {
5252
this.packetFactory = packetFactory;
5353
this.address = address;
5454
this.port = port;
@@ -67,7 +67,7 @@ private VBAN(Factory<VBANPacket> packetFactory, InetAddress address, int port) t
6767
* @throws IOException See {@link DatagramSocket#send(DatagramPacket)} for details.
6868
* @throws IllegalArgumentException If the converted byte-array from the given data is too large.
6969
*/
70-
public VBAN<D> sendData(D data) throws IOException, IllegalArgumentException {
70+
public VBAN<T> sendData(T data) throws IOException, IllegalArgumentException {
7171
writeFlush(createByteArray(data));
7272
return this;
7373
}
@@ -159,7 +159,7 @@ public void writeFlush(@NotNull byte[] b, int off, int len) throws IOException {
159159
* @return A new VBAN stream that can accept a {@link ByteArray} with {@link #sendData(Object)}.
160160
* @throws SocketException See {@link DatagramSocket} constructor.
161161
*/
162-
public static VBAN<ByteArray> openByteStream(Factory<VBANPacket> packetFactory, InetAddress address, int port)
162+
public static VBAN<ByteArray> openByteStream(Factory<VBANPacket<ByteArray>> packetFactory, InetAddress address, int port)
163163
throws SocketException {
164164
return new VBAN<>(packetFactory, address, port);
165165
}

0 commit comments

Comments
 (0)