Home » Archives for Ashraf Sarhan » Page 4

Author Archives: Ashraf Sarhan

Ashraf Sarhan is a passionate software engineer, an open source enthusiast, has a Bsc. degree in Computer and Information Systems from Alexandria University. He is experienced in building large, scalable and distributed enterprise applications/service in multiple domains. He also has a keen interest in JavaEE, SOA, Agile and Big Data technologies.

java.net.HttpCookie Example

In this example we shall show you how to make use of HttpCookie class, HttpCookie is used to implement the HTTP state management mechanism which specifies a way to create a stateful session with HTTP requests and responses. Generally, HTTP request/response pairs are independent of each other. However, the state management mechanism enables clients and servers to exchange state information and put ...

Read More »

java.net.JarURLConnection Example

In this example we shall show you how to make use of JarURLConnection class, This class establishes a connection to a jar URL using the JAR protocol. A JarURLConnection instance can refer to either a JAR archive file or to an entry of such a file. jar URLs are specified as follows: jar:{archive-url}!/{entry} where !/ is called a separator. This separator ...

Read More »

java.net.URLEncoder Example

In this example we shall show you how to make use of URLEncoder class. URLEncoder is a utility class for HTML form encoding, contains static methods for converting a string to the application/x-www-form-urlencoded MIME format. This class is very useful to encode URL query string values.         When encoding a string, the following rules apply: The alphanumeric ...

Read More »

java.net.URLClassLoader Example

In this example we shall show you how to make use of URLClassLoader, This class can be used to load a Class or a collection of classes that are accessible via URLs which referring to both JAR files and directories. Any URL that ends with a ‘/’ is assumed to refer to a directory. Otherwise, the URL is assumed to ...

Read More »

JAXB JSON Example

In this example we shall show you how to make use of JAXB-JSON. JAXB is a java architecture for XML binding is an efficient technology to convert XML to and from Java Object. EclipseLink JAXB (MOXy) is one of JAXB implementation which is mostly used to create java classes from XML or JSON. In Java JAXB provides two general purpose ...

Read More »

How to Install NetBeans IDE 8.0 in Ubuntu

In this example we shall show you how to install NetBeans IDE 8.0 which was finally released on March 18, 2014, it provides out-of-the-box code analyzers and editors for working with the latest Java 8 technologies. Besides the Java 8 support, the IDE also has a range of new enhancements that further improve its support for Maven, Java EE with PrimeFaces, new ...

Read More »

Java Sorted Map Example

In this example we shall show you how to make use of Java Sorted Map. A SortedMap is a Map that sort its entries in ascending order according to the keys’ natural ordering, or according to a Comparator provided at the time of the SortedMap creation. All keys inserted into a SortedMap must implement the Comparable interface (or be accepted by the specified Comparator). Furthermore, all such elements must be mutually comparable (i.e, Mutually ...

Read More »

Java Sorted Set Example

In this example we shall show you how to make use of Java Sorted Set. Java Sorted Set is a Set that further provides a total ordering on its elements. The elements are ordered using their natural ordering, or by a Comparator typically provided at sorted set creation time. All elements inserted into a sorted set must implement the Comparable interface (or ...

Read More »

Java System Properties Example

In this example we are going to demonstrate how to use Java System Properties. Java application can read System Properties, which provide information about the local system and configuration. When the java VM starts, its inserts local system properties into a system properties list. You can then use methods defined as part of the System Class to maintain the value of ...

Read More »