Click here to Skip to main content
15,888,461 members
Home / Discussions / Java
   

Java

 
AnswerRe: my .ex don't work as expected Pin
TorstenH.3-Jun-14 1:20
TorstenH.3-Jun-14 1:20 
QuestionLimit of the XML file. Pin
User 1006066521-May-14 23:55
User 1006066521-May-14 23:55 
AnswerRe: Limit of the XML file. Pin
jschell22-May-14 9:20
jschell22-May-14 9:20 
GeneralMessage Closed Pin
22-May-14 19:58
User 1006066522-May-14 19:58 
GeneralRe: Limit of the XML file. Pin
Richard MacCutchan22-May-14 21:07
mveRichard MacCutchan22-May-14 21:07 
GeneralRe: Limit of the XML file. Pin
User 1006066527-May-14 22:59
User 1006066527-May-14 22:59 
GeneralRe: Limit of the XML file. Pin
jschell26-May-14 7:51
jschell26-May-14 7:51 
Questionretrieve all the image data from data base and it should be printed or appended on one ms word Pin
depak gupta20-May-14 21:48
depak gupta20-May-14 21:48 
Hi,
i've a web application which has mysql quesry browser as backened,in database i've stored image data using longblob as datatype with the help of inputsteam.
the application is for peproposal kind of stuff where user get list of question, on selection of question will get answer consist of images that diplayed on one msword .
Now every thing is getting fine but list of answer from database not able to be printed on msword one after another instead last answer get only displayed below is code snipet so please provide any solution .
Thanks in advance,

Java
public Object mapRow(ResultSet rs, int arg1)
                        throws SQLException {
                    for(int k=0;k<answers.length;k++){
                        DomainForm d = new DomainForm();
                        d.setAnswer(rs.getBinaryStream("Answer"));
                        InputStream s = (InputStream)d.getAnswer();
                        System.out.println("This is S values:"+s);
                        answers[k]= s;

                    }

                    return null;
                }

            });
        }
        try {


            Vector v=new Vector();
            for(InputStream is : answers){
                v.add(is);
                System.out.println("ele"+is);

            }
            System.out.println("elements"+v.elements());
            Enumeration e=v.elements();
            SequenceInputStream sis = new SequenceInputStream(e);
            byte[] buffer1 = new byte[1024];
            int size1 = 0;
            response.setContentType("application/msword");

            while ((size1 = sis.read(buffer1)) > 0) {
                response.getOutputStream().write(buffer1, 0, size1);
            }
            response.getOutputStream().flush();
            sis.close();

        } catch (IOException e) {
            e.printStackTrace();
        }
        return ans;
    }

QuestionCellphone Banking Pin
dabrainsoftware20-May-14 1:38
dabrainsoftware20-May-14 1:38 
AnswerRe: Cellphone Banking Pin
Richard MacCutchan20-May-14 2:56
mveRichard MacCutchan20-May-14 2:56 
AnswerRe: Cellphone Banking Pin
thatraja20-May-14 4:32
professionalthatraja20-May-14 4:32 
Questionhow to run JASA (java auction simulator api) Pin
ho0olvlan17-May-14 10:29
ho0olvlan17-May-14 10:29 
AnswerRe: how to run JASA (java auction simulator api) Pin
Richard MacCutchan17-May-14 21:36
mveRichard MacCutchan17-May-14 21:36 
AnswerRe: how to run JASA (java auction simulator api) Pin
Prasad Khandekar23-May-14 2:13
professionalPrasad Khandekar23-May-14 2:13 
QuestionWrite a program to count occurances of each character in a string Pin
chiku249-May-14 9:12
chiku249-May-14 9:12 
AnswerRe: Write a program to count occurances of each character in a string Pin
Tanvir Ahmed Tanin9-May-14 16:00
Tanvir Ahmed Tanin9-May-14 16:00 
GeneralRe: Write a program to count occurances of each character in a string Pin
TorstenH.11-May-14 21:52
TorstenH.11-May-14 21:52 
QuestionJChomboBox Pin
Kokkula7-May-14 21:49
Kokkula7-May-14 21:49 
AnswerRe: JChomboBox Pin
TorstenH.9-May-14 4:35
TorstenH.9-May-14 4:35 
GeneralRe: JChomboBox Pin
Kokkula9-May-14 19:27
Kokkula9-May-14 19:27 
GeneralRe: JChomboBox Pin
Richard MacCutchan9-May-14 21:41
mveRichard MacCutchan9-May-14 21:41 
QuestionHELP Pin
Member 107983016-May-14 1:40
Member 107983016-May-14 1:40 
SuggestionRe: HELP Pin
Richard MacCutchan6-May-14 6:00
mveRichard MacCutchan6-May-14 6:00 
GeneralRe: HELP Pin
Member 107983016-May-14 7:08
Member 107983016-May-14 7:08 
GeneralRe: HELP Pin
Richard MacCutchan6-May-14 9:06
mveRichard MacCutchan6-May-14 9:06 

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.