Home » Archives for Nikos Maravitsas » Page 2

Author Archives: Nikos Maravitsas

Nikos has graduated from the Department of Informatics and Telecommunications of The National and Kapodistrian University of Athens. During his studies he discovered his interests about software development and he has successfully completed numerous assignments in a variety of fields. Currently, his main interests are system’s security, parallel systems, artificial intelligence, operating systems, system programming, telecommunications, web applications, human – machine interaction and mobile development.

java.net.URISyntaxException – How to solve URISyntaxException

In this example we are going to talk about java.net.URISyntaxException. This is a checked exception that occurs when you are trying to parse a string that represents a URI, but it doesn’t have the correct format. 1. A simple example of URISyntaxException Let’s see a program that parses a legal URI: URISyntaxExceptioExample.java:   package com.javacodegeeks.core.net.urisyntaxexception; import java.net.URI; import java.net.URISyntaxException; public ...

Read More »

java.net.SocketException – How to solve SocketException

In this example we are going to talk about java.net.SocketException. This is a subclass of IOException so it’s a checked exception. It is the most general exception that signals a problem when trying to open or access a socket. As you might already know, it’s strongly advised to use the most “specific” socket exception class that designates the problem more ...

Read More »

java.net.ConnectException – How to solve Connect Exception

In this example we are going to discuss about one of the most common exceptions you will come across when dealing with network programming in Java: ConnectException. ConnectException is a subclass of SocketException, and that alone reveals that it is meant to inform you about an error that occurred when you tried to create or access a socket. To be ...

Read More »

How to Create Directory in Java Example

Following the “How to create file in Java Example“, in this example we are going to see how to create a new Directory/Folder in your file system with Java. As you might have noticed, Java offers a very rich I/O API. So. it is fairly easy to create a Directory in Java. 1. Create a single Directory Let’s see how ...

Read More »

How to create file in Java Example

In this example we are going to see how to create a new file in Java. It’s fairly easy to do so, using Java File class. First of all, you have to format a string that describes the file path in your file system that you want to create this file into. For this example, I’ve worked on a Windows ...

Read More »

Java FilenameFilter Example

In this example we are going to talk about Java FilenameFilter interface. FilenameFilter is a very convenient interface that helps you filter out specific file names when listing a folder. So, as you might imagine, it is particularly useful for applications that have to navigate through big file systems. Filter file extension In order to use the FilenameFilter class to ...

Read More »

Java InputStreamReader Example

In this example we are going to talk about InputStreamReader Java Class. InputStreamReader is a subclass of Reader. A Reader‘s job is to connect your program to a data source, and fetch data from that source and make them available to your program for manipulation. But its purpose is to bridge the byte stream from that source to a character ...

Read More »