Skip to content

Commit

Permalink
[JAVA-41854] Moving some article links on Github - core-java-networki…
Browse files Browse the repository at this point in the history
…ng (eugenp#18003)
  • Loading branch information
panos-kakos authored Nov 28, 2024
1 parent 00b1181 commit 40a9569
Show file tree
Hide file tree
Showing 45 changed files with 241 additions and 175 deletions.
4 changes: 1 addition & 3 deletions core-java-modules/core-java-networking-2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,9 @@ This module contains articles about networking in Java
- [Checking if a URL Exists in Java](https://www.baeldung.com/java-check-url-exists)
- [Making a JSON POST Request With HttpURLConnection](https://www.baeldung.com/httpurlconnection-post)
- [Using Curl in Java](https://www.baeldung.com/java-curl)
- [Do a Simple HTTP Request in Java](https://www.baeldung.com/java-http-request)
- [Sending Emails with Java](https://www.baeldung.com/java-email)
- [Authentication with HttpUrlConnection](https://www.baeldung.com/java-http-url-connection)
- [Download a File From an URL in Java](https://www.baeldung.com/java-download-file)
- [Handling java.net.ConnectException](https://www.baeldung.com/java-net-connectexception)
- [Getting MAC Addresses in Java](https://www.baeldung.com/java-mac-address)
- [Sending Emails with Attachments in Java](https://www.baeldung.com/java-send-emails-attachments)
- [Connecting Through Proxy Servers in Core Java](https://www.baeldung.com/java-connect-via-proxy-server)
- [[<-- Prev]](/core-java-modules/core-java-networking) [[Next --> ]](/core-java-modules/core-java-networking-3)
18 changes: 0 additions & 18 deletions core-java-modules/core-java-networking-2/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,38 +29,20 @@
<artifactId>angus-mail</artifactId>
<version>${angus.mail.version}</version>
</dependency>
<dependency>
<groupId>org.asynchttpclient</groupId>
<artifactId>async-http-client</artifactId>
<version>${async-http-client.version}</version>
</dependency>
<dependency>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
<version>${jakarta.bind.version}</version>
</dependency>
<dependency>
<groupId>com.icegreen</groupId>
<artifactId>greenmail</artifactId>
<version>${greenmail.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents.client5</groupId>
<artifactId>httpclient5</artifactId>
<version>${apache.httpclient.version}</version>
</dependency>
</dependencies>

<build>
<finalName>core-java-networking-2</finalName>
</build>

<properties>
<apache.httpclient.version>5.3.1</apache.httpclient.version>
<angus.mail.version>2.0.1</angus.mail.version>
<async-http-client.version>2.4.5</async-http-client.version>
<jakarta.bind.version>2.3.3</jakarta.bind.version>
<greenmail.version>2.0.0-alpha-3</greenmail.version>
<commons-codec.version>1.16.0</commons-codec.version>
</properties>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
package com.baeldung.networking.proxies;

import java.io.IOException;
import java.net.*;
import java.net.HttpURLConnection;
import java.net.Proxy;
import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;

public class DirectProxyDemo {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
package com.baeldung.networking.proxies;

import java.io.IOException;
import java.net.*;
import java.net.HttpURLConnection;
import java.net.InetSocketAddress;
import java.net.Proxy;
import java.net.Socket;
import java.net.URI;
import java.net.URL;

public class SocksProxyDemo {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
package com.baeldung.networking.proxies;

import java.io.IOException;
import java.net.*;
import java.net.HttpURLConnection;
import java.net.InetSocketAddress;
import java.net.Proxy;
import java.net.URI;
import java.net.URL;

public class WebProxyDemo {

Expand Down
1 change: 0 additions & 1 deletion core-java-modules/core-java-networking-3/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ This module contains articles about networking in Java

- [Finding a Free Port in Java](https://www.baeldung.com/java-free-port)
- [Downloading Email Attachments in Java](https://www.baeldung.com/java-download-email-attachments)
- [Connection Timeout vs. Read Timeout for Java Sockets](https://www.baeldung.com/java-socket-connection-read-timeout)
- [Find Whether an IP Address Is in the Specified Range or Not in Java](https://www.baeldung.com/java-check-ip-address-range)
- [Find the IP Address of a Client Connected to a Server](https://www.baeldung.com/java-client-get-ip-address)
- [Unix Domain Socket in Java 16](https://www.baeldung.com/java-unix-domain-socket)
Expand Down
1 change: 0 additions & 1 deletion core-java-modules/core-java-networking-4/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
- [Validating IPv4 Address in Java](https://www.baeldung.com/java-validate-ipv4-address)
- [Download a Webpage in Java](https://www.baeldung.com/java-download-webpage)
- [URL Query Manipulation in Java](https://www.baeldung.com/java-url-query-manipulation)
- [Understanding the java.net.SocketException Broken Pipe Error](https://www.baeldung.com/java-socketexception-broken-pipe-error)
- [Normalize a URL in Java](https://www.baeldung.com/java-url-normalization)
- [Translating Space Characters in URLEncoder](https://www.baeldung.com/java-urlencoder-translate-space-characters)
- [Creating a Custom URL Connection](https://www.baeldung.com/java-custom-url-connection)
Expand Down
6 changes: 6 additions & 0 deletions core-java-modules/core-java-networking-5/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,10 @@
- [Finding the Redirected URL of a URL in Java](https://www.baeldung.com/java-find-redirected-url)
- [How to Read Text Inside Mail Body](https://www.baeldung.com/java-read-text-inside-mail-body)
- [Finding the Size of a Web File Using URLConnection in Java](https://www.baeldung.com/java-urlconnection-web-file-size)
- [Broadcasting and Multicasting in Java](http://www.baeldung.com/java-broadcast-multicast)
- [A Guide to UDP In Java](https://www.baeldung.com/udp-in-java)
- [Difference Between URL and URI](https://www.baeldung.com/java-url-vs-uri)
- [A Guide to HTTP Cookies in Java](https://www.baeldung.com/cookies-java)
- [Working with Network Interfaces in Java](http://www.baeldung.com/java-network-interfaces)
- [Read an InputStream using the Java Server Socket](https://www.baeldung.com/java-inputstream-server-socket)
- [[<-- Prev]](/core-java-modules/core-java-networking-4)
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
package com.baeldung.networking.cookies;

import java.net.*;
import java.net.CookieManager;
import java.net.CookieStore;
import java.net.HttpCookie;
import java.net.URI;
import java.util.List;

public class PersistentCookieStore implements CookieStore, Runnable {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
package com.baeldung.networking.cookies;

import java.net.*;
import java.net.CookiePolicy;
import java.net.HttpCookie;
import java.net.InetAddress;
import java.net.URI;
import java.net.UnknownHostException;

public class ProxyAcceptCookiePolicy implements CookiePolicy {
String acceptedProxy;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package com.baeldung.networking.uriurl;

import java.io.BufferedReader;
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URI;
import java.net.URISyntaxException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.*;
import java.net.HttpURLConnection;
import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;
import java.net.URLConnection;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
package com.baeldung.socket.read;

import java.net.*;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import java.net.Socket;
import java.nio.charset.StandardCharsets;
import java.io.*;

public class Client {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
package com.baeldung.socket.read;

import java.net.*;
import java.io.BufferedInputStream;
import java.io.DataInputStream;
import java.net.ServerSocket;
import java.net.Socket;
import java.nio.charset.StandardCharsets;
import java.io.*;

public class Server {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
package com.baeldung.networking.interfaces;

import org.junit.Test;

import java.net.*;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;

import java.net.InetAddress;
import java.net.InterfaceAddress;
import java.net.NetworkInterface;
import java.net.SocketException;
import java.net.UnknownHostException;
import java.util.Enumeration;
import java.util.List;

import static org.junit.Assert.*;
import org.junit.Test;

public class NetworkInterfaceManualTest {
@Test
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package com.baeldung.networking.udp;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;

import java.io.IOException;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;

public class UDPLiveTest {
private EchoClient client;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package com.baeldung.networking.udp.broadcast;

import org.junit.After;
import org.junit.Test;
import static org.junit.Assert.assertEquals;

import java.io.IOException;

import static org.junit.Assert.assertEquals;
import org.junit.After;
import org.junit.Test;

public class BroadcastLiveTest {
private BroadcastingClient client;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package com.baeldung.networking.udp.multicast;

import org.junit.After;
import org.junit.Test;
import static org.junit.Assert.assertEquals;

import java.io.IOException;

import static org.junit.Assert.assertEquals;
import org.junit.After;
import org.junit.Test;

public class MulticastLiveTest {
private MulticastingClient client;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,18 @@

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;
import java.net.URLConnection;

import org.junit.BeforeClass;
import org.junit.FixMethodOrder;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.baeldung.networking.uriurl.URLDemo;

@FixMethodOrder
public class URIDemoLiveTest {
private final Logger log = LoggerFactory.getLogger(URIDemoLiveTest.class);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
package com.baeldung.networking.uriurl;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;

import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;

import org.apache.commons.io.IOUtils;
import static org.junit.Assert.*;
import org.junit.Test;

public class URIvsURLUnitTest {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,17 @@
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.*;
import java.net.HttpURLConnection;
import java.net.URI;
import java.net.URL;
import java.net.URLConnection;

import org.junit.BeforeClass;
import org.junit.FixMethodOrder;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.baeldung.networking.uriurl.URLDemo;

@FixMethodOrder
public class URLDemoLiveTest {
private final Logger log = LoggerFactory.getLogger(URLDemoLiveTest.class);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.baeldung.socket.read;

import java.util.concurrent.TimeUnit;

import org.junit.jupiter.api.Test;

public class SocketReadAllDataLiveTest {
Expand Down
12 changes: 5 additions & 7 deletions core-java-modules/core-java-networking/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,12 @@ This module contains articles about networking in Java

### Relevant Articles

- [Connecting Through Proxy Servers in Core Java](https://www.baeldung.com/java-connect-via-proxy-server)
- [Broadcasting and Multicasting in Java](http://www.baeldung.com/java-broadcast-multicast)
- [A Guide to UDP In Java](https://www.baeldung.com/udp-in-java)
- [A Guide to HTTP Cookies in Java](https://www.baeldung.com/cookies-java)
- [A Guide to the Java URL](http://www.baeldung.com/java-url)
- [Working with Network Interfaces in Java](http://www.baeldung.com/java-network-interfaces)
- [A Guide to Java Sockets](http://www.baeldung.com/a-guide-to-java-sockets)
- [Guide to Java URL Encoding/Decoding](http://www.baeldung.com/java-url-encoding-decoding)
- [Difference Between URL and URI](https://www.baeldung.com/java-url-vs-uri)
- [Read an InputStream using the Java Server Socket](https://www.baeldung.com/java-inputstream-server-socket)
- [Sending Emails with Java](https://www.baeldung.com/java-email)
- [Download a File From an URL in Java](https://www.baeldung.com/java-download-file)
- [Do a Simple HTTP Request in Java](https://www.baeldung.com/java-http-request)
- [Understanding the java.net.SocketException Broken Pipe Error](https://www.baeldung.com/java-socketexception-broken-pipe-error)
- [Connection Timeout vs. Read Timeout for Java Sockets](https://www.baeldung.com/java-socket-connection-read-timeout)
- [[More -->]](/core-java-modules/core-java-networking-2)
29 changes: 29 additions & 0 deletions core-java-modules/core-java-networking/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,31 @@
<artifactId>httpclient</artifactId>
<version>${apache.httpclient.version}</version>
</dependency>
<dependency>
<groupId>com.icegreen</groupId>
<artifactId>greenmail</artifactId>
<version>${greenmail.version}</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents.client5</groupId>
<artifactId>httpclient5</artifactId>
<version>${apache.httpclient5.version}</version>
</dependency>
<dependency>
<groupId>org.asynchttpclient</groupId>
<artifactId>async-http-client</artifactId>
<version>${async-http-client.version}</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>${commons-lang3.version}</version>
</dependency>
<dependency>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
<version>${jakarta.bind.version}</version>
</dependency>
</dependencies>

<build>
Expand All @@ -33,6 +58,10 @@
<properties>
<springframework.spring-web.version>4.3.4.RELEASE</springframework.spring-web.version>
<apache.httpclient.version>4.5.14</apache.httpclient.version>
<greenmail.version>2.0.0-alpha-3</greenmail.version>
<apache.httpclient5.version>5.3.1</apache.httpclient5.version>
<async-http-client.version>2.4.5</async-http-client.version>
<jakarta.bind.version>2.3.3</jakarta.bind.version>
</properties>

</project>
Loading

0 comments on commit 40a9569

Please sign in to comment.