Click here to Skip to main content
15,918,275 members
Home / Discussions / Java
   

Java

 
QuestionJava application path in Eclipse juno show wrong neet to set correct Pin
Balmukund Dewangan21-Jun-13 4:21
Balmukund Dewangan21-Jun-13 4:21 
AnswerRe: Java application path in Eclipse juno show wrong neet to set correct Pin
Richard MacCutchan21-Jun-13 5:25
mveRichard MacCutchan21-Jun-13 5:25 
GeneralRe: Java application path in Eclipse juno show wrong neet to set correct Pin
Balmukund Dewangan21-Jun-13 6:32
Balmukund Dewangan21-Jun-13 6:32 
GeneralRe: Java application path in Eclipse juno show wrong neet to set correct Pin
Richard MacCutchan21-Jun-13 6:56
mveRichard MacCutchan21-Jun-13 6:56 
GeneralRe: Java application path in Eclipse juno show wrong neet to set correct Pin
Balmukund Dewangan21-Jun-13 18:11
Balmukund Dewangan21-Jun-13 18:11 
GeneralRe: Java application path in Eclipse juno show wrong neet to set correct Pin
Balmukund Dewangan21-Jun-13 21:17
Balmukund Dewangan21-Jun-13 21:17 
GeneralRe: Java application path in Eclipse juno show wrong neet to set correct Pin
Richard MacCutchan21-Jun-13 21:59
mveRichard MacCutchan21-Jun-13 21:59 
GeneralRe: Java application path in Eclipse juno show wrong neet to set correct Pin
Balmukund Dewangan21-Jun-13 22:31
Balmukund Dewangan21-Jun-13 22:31 
GeneralRe: Java application path in Eclipse juno show wrong neet to set correct Pin
Richard MacCutchan22-Jun-13 0:59
mveRichard MacCutchan22-Jun-13 0:59 
QuestionWebservice in Java Pin
Ganeshbabu.R21-Jun-13 2:27
professionalGaneshbabu.R21-Jun-13 2:27 
AnswerRe: Webservice in Java Pin
NotPolitcallyCorrect21-Jun-13 2:36
NotPolitcallyCorrect21-Jun-13 2:36 
GeneralRe: Webservice in Java Pin
Ganeshbabu.R21-Jun-13 2:49
professionalGaneshbabu.R21-Jun-13 2:49 
GeneralRe: Webservice in Java Pin
Sudhakar Shinde2-Jul-13 23:40
Sudhakar Shinde2-Jul-13 23:40 
QuestionConverting Wav file to MP3 or other format Pin
manojnovpandey21-Jun-13 2:25
manojnovpandey21-Jun-13 2:25 
AnswerRe: Converting Wav file to MP3 or other format Pin
NotPolitcallyCorrect21-Jun-13 2:37
NotPolitcallyCorrect21-Jun-13 2:37 
QuestionPlease help me to solve “fix control's position in GridBagLayout” Pin
Bee cute21-Jun-13 1:40
Bee cute21-Jun-13 1:40 
Questionrecent file list Pin
Member 1009379520-Jun-13 23:45
Member 1009379520-Jun-13 23:45 
AnswerRe: recent file list Pin
Richard MacCutchan21-Jun-13 2:21
mveRichard MacCutchan21-Jun-13 2:21 
QuestionHow to displayed a yield in jtable? Pin
tolulan20-Jun-13 5:00
tolulan20-Jun-13 5:00 
AnswerRe: How to displayed a yield in jtable? Pin
Richard MacCutchan20-Jun-13 7:02
mveRichard MacCutchan20-Jun-13 7:02 
QuestionInsert blob from android to oracle Pin
Raditya Kurnianto16-Jun-13 19:36
Raditya Kurnianto16-Jun-13 19:36 
I'm working with Oracle database. I use PHP for my web service and Android as the client which will send blob data to Oracle DB. I use this code

Bitmap imageUpload = BitmapFactory.decodeFile(picturePath);
			ByteArrayOutputStream baos = new ByteArrayOutputStream();
			imageUpload.compress(Bitmap.CompressFormat.JPEG, 60, baos);
			byte[] image_data = baos.toByteArray();
			String converted_image = Base64.encodeBytes(image_data);


to decode and send it as base64 encoding, then send it to the web service with this code

XML
ArrayList<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>();
                nameValuePairs.add(new BasicNameValuePair("TITLE", title));
                nameValuePairs.add(new BasicNameValuePair("IMAGES", converted_image));
                json = jsonParser.makeHttpRequest(url, "POST", nameValuePairs);



This is my PHP code to insert to oracle db

PHP
if(isset($_POST["TITLE"]) && isset($_POST["IMAGES"]))
    {
        $title = $_POST["TITLE"];
        $image = $_POST["IMAGES"];
        $gambar = file_get_contents($image);

        $query = "INSERT INTO images (TITLE, IMAGES) VALUES (:TITLE, EMPTY_BLOB()) RETURNING IMAGES INTO :IMAGES";
        $parse = oci_parse($connect, $query);

        $lob_a = oci_new_descriptor($connect, OCI_D_LOB);

        oci_bind_by_name($parse, ":TITLE", $title);
        oci_bind_by_name($parse, ":IMAGES", $lob_a, -1, OCI_B_BLOB);
        oci_execute($parse, OCI_DEFAULT);

        if($lob_a->save($gambar))
        {
            oci_commit($connect);
            $lob_a->free();
        }
        else
        {
            oci_rollback($connect);
        }
    }



The PHP code successfully insert the query to the oracle db, but when I see the record the blob does not show anything because the length of the blob is 0. I will appreciate any help. Thank you.
AnswerRe: Insert blob from android to oracle Pin
jschell17-Jun-13 8:12
jschell17-Jun-13 8:12 
AnswerRe: Insert blob from android to oracle Pin
Richard MacCutchan17-Jun-13 21:18
mveRichard MacCutchan17-Jun-13 21:18 
QuestionJava Scanner Pin
User 100606655-Jun-13 22:47
User 100606655-Jun-13 22:47 
AnswerRe: Java Scanner Pin
Richard MacCutchan5-Jun-13 23:34
mveRichard MacCutchan5-Jun-13 23:34 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.