Core Java
-
Read byte array from file with DataInputStream
With this example we are going to demonstrate how to read a byte array from a file with the DataInputStream.…
Read More » -
Write byte array to file with BufferedOutputStream
In this example we shall show you how to write a byte array to a file using the BufferedOutputStream. This…
Read More » -
Write byte to file with BufferedOutputStream
With this example we are going to demonstrate how to write a byte to a file with BufferedOutputStream. This class…
Read More » -
StreamTokenizer from BufferedReader example
This is an example of how to get and use a StreamTokenizer from a BufferedReader. The StreamTokenizer class takes an…
Read More » -
Read file in String with BufferedInputStream
In this example we shall show you how to read a File in String with the BufferedInputStream. To read a…
Read More » -
Read file with BufferedInputStream
With this example we are going to demonstrate how to read a file with a BufferedInputStream. In short, to read…
Read More » -
Externalize arbitrary objects
public static byte[][] serializeObject(Externalizable object) throws Exception { ByteArrayOutputStream baos = null; ObjectOutputStream oos = null; byte[][] res = new…
Read More » -
Serialize arbitrary objects
public static byte[] serializeObject(Serializable object) throws Exception { ByteArrayOutputStream baos = null; ObjectOutputStream oos = null; byte[] res = null;…
Read More » -
Check when an object will be reclaimed
This is an example of how to check when an object will be reclaimed. Checking when an object will be…
Read More » -
Check when an object is no longer referenced
In this example we shall show you how to check when an object is no longer referenced. To check when…
Read More »