Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.awt.Image;
import java.awt.Toolkit;
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.sql.ResultSet;

public class Main {
    public static void main(String[] argv) throws Exception {
        ResultSet rset = null;
        InputStream stream = rset.getBinaryStream(1);
        ByteArrayOutputStream output = new ByteArrayOutputStream();
        int a1 = stream.read();
        while (a1 >= 0) {
            output.write((char) a1);
            a1 = stream.read();
        }
        Image myImage = Toolkit.getDefaultToolkit().createImage(output.toByteArray());
        output.close();

    }
}