cancel
Showing results for 
Search instead for 
Did you mean: 

Get Image from Ultralite

Former Member
0 Kudos
1,564

Can any one tell me how to get bitmap from ultralite database using ResultSet.getBlobInputStream?

philippefbertrand
Participant
0 Kudos

Can you tell us what platform and API you are using? What version of UltraLite are you using?

Former Member
0 Kudos

I am using Android. I have the image stored in ultralite database in form of byte array.

Former Member
0 Kudos

The following code fragment gives the idea:

ResultSet rs = ps.executeQuery();
while( rs.next() ) {
    if( !rs.isNull( 3 ) ) {
        InputStream is = rs.getBlobInputStream( 3 );
        // read the column using InputStream
    }
}

Is that what you are looking for?

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member

The following code fragment gives the idea:

ResultSet rs = ps.executeQuery();
while( rs.next() ) {
    if( !rs.isNull( 3 ) ) {
        InputStream is = rs.getBlobInputStream( 3 );
        // read the column using InputStream
    }
}
VolkerBarth
Contributor
0 Kudos

@Andy: FWIW, you can also "convert an existing comment to an answer" with the help of the leftmost button below the comment...