How to send HTTP request GET/POST in Java
In this article, we will show you a few examples to make HTTP GET/POST requests via the following APIs: Apache HttpClient 4.5.13, OkHttp 4.2.2, Java 11 HttpClient, Java 1.1 HttpURLConnection…
Spring REST + Spring Security Example
In this article, we will enhance the previous Spring REST Validation Example, by adding Spring Security to perform authentication and authorization for the requested URLs (REST API endpoints). Technologies used…
Spring Boot Tutorials
Spring Boot makes it quick and easy to create a Spring based applications. Spring Boot Tutorials are included Spring MVC or Web application, Spring RESTful web service, Spring WebFlux, Spring…
Apache Maven Tutorial
Apache Maven, is an innovative software project management tool. It uses a project object model (POM) file to manage project’s build, dependencies, reporting and documentation.
Java cryptography tutorials
All examples about java cryptography, encryption, decryption, hashing, security, bitwise Java MD5 Hashing Example Java SHA-256 and SHA3-256 Hashing Example Java – Convert String to Binary Java – Convert Integer…
Apache HttpClient Examples
This article shows you how to use Apache HttpClient to send an HTTP GET/POST requests, JSON, timeout, redirection and some frequent used examples. This article shows you how to use…
Convert InputStream to BufferedReader in Java
The BufferedReader reads characters; while the InputStream is a stream of bytes. The BufferedReader can’t read the InputStream directly; So, we need to use an adapter like InputStreamReader to convert…
How to copy file in Java
This article shows four ways to copy a file in Java: (1) Files.copy (NIO), (2) Apache Commons IO, (3) Guava, (4) Plain Java. In Java 7+, the NIO Files.copy is…
How to get file last modified date in Java
In Java, we can use Files.readAttributes() to get the file metadata or attribute, and then lastModifiedTime() to display the last modified date of a file. For legacy IO, we can…