public class UdpReceive extends Object implements AutoCloseable
| Constructor and Description | 
|---|
UdpReceive(int port)  | 
| Modifier and Type | Method and Description | 
|---|---|
UdpReceive | 
bufferSize(int bufferSize)  | 
void | 
close()  | 
DatagramSocket | 
getDatagramSocket()  | 
int | 
getPort()  | 
int | 
receive(byte[] bs)  | 
int | 
receive(byte[] bs,
       int len)  | 
int | 
receive(byte[] bs,
       int off,
       int len)  | 
DatagramPacket | 
receivePacket(byte[] bs)  | 
DatagramPacket | 
receivePacket(byte[] bs,
             int len)  | 
DatagramPacket | 
receivePacket(byte[] bs,
             int off,
             int len)  | 
UdpReceive | 
timeout(int timeOut)  | 
public UdpReceive(int port)
           throws IOException
IOExceptionpublic UdpReceive bufferSize(int bufferSize) throws SocketException
SocketExceptionpublic UdpReceive timeout(int timeOut) throws SocketException
SocketExceptionpublic int receive(byte[] bs)
            throws IOException
IOExceptionpublic int receive(byte[] bs,
                   int len)
            throws IOException
IOExceptionpublic int receive(byte[] bs,
                   int off,
                   int len)
            throws IOException
IOExceptionpublic DatagramPacket receivePacket(byte[] bs) throws IOException
IOExceptionpublic DatagramPacket receivePacket(byte[] bs, int len) throws IOException
IOExceptionpublic DatagramPacket receivePacket(byte[] bs, int off, int len) throws IOException
IOExceptionpublic void close()
close in interface AutoCloseablepublic int getPort()
public DatagramSocket getDatagramSocket()
Copyright © 2025. All rights reserved.