SupportWriter space ↗
A JOURNAL ABOUT TECHNOLOGY

Learn something new.
Write. Share.

A space to connect knowledge, one line of code a day.
Discover tutorials, ideas, and notes from a learning journey.

1967 notes & counting ↙
EDITOR’S PICK ↗
Pentesting

Planning Your First Web Application Pentest: Scope, Safety, and Evidence

Build a focused web pentest plan with clear authorization, realistic objectives, controlled testing, and evidence that developers can use.

D Putu Adi Guna Permana · 3 min read
FOR YOUR CURIOSITY

Latest notes.

JDBC / NOTES</>↗
JDBC07 Jan 2008

How do I read CLOBs data from database?

package org.kodejava.jdbc; import java.io.File; import java.io.FileWriter; import java.io.Reader; import java.nio.charset.StandardCharsets; import java.sql.*; public class ClobReadDemo { private static final String URL = "jdbc:mysql://localhost/kodejava"; private static final String USERNAME = "kodejava"; private static final String PASSWORD = "s3cr*t"; public static void main(String[] args) { try (Connection conn = DriverManager.getConnection(URL, USERNAME, PASSWORD)) { Stri...

Wayan · 2 min read
JDBC / NOTES</>↗
JDBC02 Jan 2008

How do I store CLOBs data into database?

package org.kodejava.jdbc; import java.io.File; import java.io.FileReader; import java.sql.Connection; import java.sql.DriverManager; import java.sql.PreparedStatement; import java.sql.SQLException; public class ClobInsertDemo { private static final String URL = "jdbc:mysql://localhost/kodejava"; private static final String USERNAME = "kodejava"; private static final String PASSWORD = "s3cr*t"; public static void main(String[] args) { try (Connection conn = DriverManager.getC...

Wayan · 2 min read
JDBC / NOTES</>↗
JDBC30 Dec 2007

How do I read BLOBs data from database?

This example shows you how to read BLOBs data from database table. package org.kodejava.jdbc; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.sql.*; public class BlobReadDemo { private static final String URL = "jdbc:mysql://localhost/kodejava"; private static final String USERNAME = "kodejava"; private static final String PASSWORD = "s3cr*t"; public static void main(String[] args) { […]

Wayan · 2 min read
JDBC / NOTES</>↗
JDBC26 Dec 2007

How do I store BLOBs data into database?

Database BLOBs (Binary Large Objects) can be used to store any data, such as images, audio, or video files, for instance. This example shows you how we use JDBC library to store image in our database. To send the binary information to the database, we can call the PreparedStatement.setBinaryStream() method and pass the appropriate input […]

Wayan · 2 min read
JDBC / NOTES</>↗
JDBC25 Dec 2007

How do I execute stored procedure?

Stored-procedure are user-generated functions or procedures that, once created in the database, it can be called by the client applications, such as Java application. In this example we’ll demonstrate how to use the JDBC java.sql.CallableStatement to call a stored procedure. The store procedure in this example is just for selecting records from the products table. […]

Wayan · 2 min read
CORE API / NOTES</>↗
Core API21 Dec 2007

How do I sort items in a Set?

The trick to sort a java.util.Set is to use the implementation of a java.util.SortedSet such as the java.util.TreeSet class. The example below shows you the result of using the java.util.TreeSet class, in which the items in it will be sorted based on the element’s natural order. package org.kodejava.util; import java.util.Set; import java.util.TreeSet; public class TreeSetDemo […]

Wayan · 2 min read
✳

Knowledge grows when shared.

Stay curious. There is always something new to learn.

Explore notes ↗
Putu Adi Guna Permana
ABOUT THE AUTHOR

Dr (C). Ir. Putu Adi Guna Permana, S.Kom., M.Kom., IPM., ASEAN Eng.

Writer and founder of Diary Coding — sharing notes, tutorials, and experiences about programming for anyone who wants to keep learning.