Skip to content
Snippets Groups Projects
Commit ec48a344 authored by Brutzman, Don's avatar Brutzman, Don
Browse files

update deprecated method

parent 69d2e4e8
No related branches found
No related tags found
No related merge requests found
......@@ -12,6 +12,7 @@ import java.io.IOException;
import java.net.DatagramPacket;
import java.net.DatagramSocket;
import java.net.InetAddress;
import java.net.URI;
import java.net.URL;
import javax.imageio.ImageIO;
......@@ -48,8 +49,8 @@ public class LoeffelmanSeversonUDPImageSender
ByteArrayOutputStream baos = new ByteArrayOutputStream();
DataOutputStream dos = new DataOutputStream(baos);
// alternatives: writeFloat(17.0f); writeInt(17); writeUTF("\"hello MV3500 no really\"");
URL url1 = new URL("https://cdn1.iconfinder.com/data/icons/cute-monkey-emoticon/595/MONKEY_EMOTICON-05-512.png");
URL url2 = new URL("https://images.all-free-download.com/images/graphicthumb/yammi_banana_99225.jpg");
URL url1 = URI.create("https://cdn1.iconfinder.com/data/icons/cute-monkey-emoticon/595/MONKEY_EMOTICON-05-512.png").toURL();
URL url2 = URI.create("https://images.all-free-download.com/images/graphicthumb/yammi_banana_99225.jpg").toURL();
// Put together a message with binary content. "ByteArrayOutputStream"
// is a java.io utility that lets us put together an array of binary
// data, which we put into the UDP packet.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment