Which API should i use... ???

I want to store an image into databse. Which API is used for this purpose.

JDBC. There's a forum for that too if you have more specific questions about it.

Similar Messages

  • Which API can be used to write to an XML file(web.xml) programmatically

    Hi,
    I wish to write to the web.xml file programmatically.Could anyone point me to the
    API that is to be used.
    I am aware of the API to be used for extracting the node and the tag values - com.bea.p13n.xml.util.DomHelper
    but this class has only getters and I wish to know which API should be used to set
    the xml nodes.
    It is important and am looking forward to pointers.
    Thanks in advance!
    Regards,
    Shikha

    S. Bajaj
    org.w3c.dom Api
    Deepak
    shikha wrote:
    Hi,
    I wish to write to the web.xml file programmatically.Could anyone point me to the
    API that is to be used.
    I am aware of the API to be used for extracting the node and the tag values - com.bea.p13n.xml.util.DomHelper
    but this class has only getters and I wish to know which API should be used to set
    the xml nodes.
    I am unable to find answer to this.
    Looking forward to pointers and help.
    Thanks in advance!
    Regards,
    Shikha

  • Which listener should be used for JTextArea

    Hi,
    I need to add a listener for JTextArea particualy when
    the text in the jtextarea is changed. I don't think
    mouse listener is enough, since the user can use tab to
    get to the jtextarea and edit the text. In this case,
    which listener should I use. Sample code would be
    helpful.
    In addition, I have a problem with the jtextarea that
    when user uses tab to go to different gui components,
    such as jtextfield, jcombobox, jtextarea, jlist, etc, the
    tab stays in the jtextarea and keeps appending to it. It does
    not go to next component, such as jlist. How can I make it
    work?
    Thanks in advance,
    Pin

    It doesn't work. Are you using 1.4 or 1.3? I am using
    1.4.
    In the 1.4 API, it says that isManagingFocus is
    "Deprecated".
    Here is what I have:
    JTextArea descrptArea = new JTextArea() {
    public boolean isManagingFocus() {
    return false;
    descrptArea.setRows(3);
    descrptArea.setLineWrap(true);
    descrptArea.addKeyListener(new KeyAdapter() {
    public void keyTyped(KeyEvent e) {
    // DO SOMETHING
    I found the following code which says it will do it.
    However, I got the exeception:
    java.lang.ClassCastException:
    n: javax.swing.KeyStroke
    at java.util.TreeMap.compare(TreeMap.java:1081)
    at java.util.TreeMap.put(TreeMap.java:459)
    at java.util.TreeSet.add(TreeSet.java:205)
    Set forwardTraversalKeys = new TreeSet();
    forwardTraversalKeys.add(KeyStroke.getKeyStroke('\t'));
    forwardTraversalKeys.add(KeyStroke.getKeyStroke(KeyEven
    .VK_TAB,
    InputEvent.CTRL_MASK));
    textArea.setFocusTraversalKeys
    (KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS,
    forwardTraversalKeys);
    Set backwardTraversalKeys = new TreeSet();
    backwardTraversalKeys.add(KeyStroke.getKeyStroke(KeyEve
    t.VK_TAB,
    InputEvent.SHIFT_MASK));
    backwardTraversalKeys.add(KeyStroke.getKeyStroke(KeyEve
    t.VK_TAB,
    InputEvent.SHIFT_MASK |InputEvent.CTRL_MASK));
    textArea.setFocusTraversalKeys(
    KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS,
    backwardTraversalKeys);
    Any idea???
    PinI'm not using 1.4 but the class cast exceptions look like they come from : Set forwardTraversalKeys=new TreeSet() etc
    try : TreeSet forwardTraversalKeys=new TreeSet()
    you cant cast from a Set to a TreeSet because a TreeSet is a Set but a Set is NOT a TreeSet.
    hope this helps.

  • I am a student and need to do my assignments in word. Which application should I use as I have to save all of them in older word version like 2003 to send it to my teacher?

    I am a student and need to do my assignments in word. Which application should I use as I have to save all of them in older word version like 2003 to send it to my teacher?

    You could use Microsoft Office for Mac, but I would recommend iWork! It's a better set of applications for a much better price. I have used both and I prefer it over Office. And Pages can not only open Word documents, you can also save documents in Word format. My brother and I both used iWork as an Office substitute when we were in college (I graduated a few years ago and he just graduated last night) and haven't had any compatibility issues. Check it out here http://www.apple.com/iwork/

  • I have down loaded Aurora,Beta4,firefox. Which one should i use

    I have down loaded Aurora,Beta4,and Firefox. Which won should i use.'

    That is up to you to decide. For some details about the different versions see https://developer.mozilla.org/devnews/index.php/2011/04/07/new-development-channels-and-repositories-for-rapid-releases/
    If you have not used to testing software you should stick with the release version (Firefox 4.0.1).

  • Which CPU should I use

    Hello,
    our company want to buy new computers for the developers.
    We have to use Windows XP as our OS because of third party products.
    We develop J2SE + J2EE.
    So my question:
    Which CPU should we use?
    I searched at google but didn't found any usefull sides about benchmarking an J2SE VM or J2EE VM.
    Intel or AMD?
    Are there some issues to be regarded?
    Is the behavior of the VM different if you use an Intel or an AMD? (X86)
    Our AppServer is JBoss 3.2.3.
    Has Intel ore AMD some magic improvements for the SUN Java VM?
    Any answer would be appreciated.
    Thanks,
    Oliver

    Olli_ger,
    Thanks for asking. To add more to the question, what about dual- and
    multi-processors, such as Opteron 2xx and 8xx processors?
    That is, can, and to what extent, does the Java compiler and the JVM
    utilize multi-processors? And how is this done? Threads parceled out?
    Using what algorithms? Are there "best practices" for writing code
    that can exploit these chips?
    Given the recent emergence of dual-core processors from both AMD and
    Intel I would think Sun would have a white paper on this, but I've not
    been able to find anything.
    As I'm about to build a new system, and am looking at a dual processor
    board that could take two dual-core chips, I'd really like to know.
    Thanks again for opening the issue.
    -BC

  • What class / API should i used ?

    Hi, all
    what api should i used when i want to know present time (hour-minute-second) or date... i've used :
    GregorianCalendar kal = new GregorianCalendar();
    int year=kal.YEAR;
    instead i got year is 1 ??? (for present year !!) ...
    it does the same as hour and minute... i dont have the exact time like the time in my win task bar.. plzzz help me...

    This should help:
    *  Calendar Demo (by Sun, with modifications)
    import java.util.*;
    public class CalendarDemo {
        public static void main(String[] args) {
    // get the supported ids for GMT-08:00 (Pacific Standard Time)
            String[] ids = TimeZone.getAvailableIDs(-8 * 60 * 60 * 1000);
            // if no ids were returned, something is wrong. get out.
            if (ids.length == 0) {
                System.exit(0);
    // create a Pacific Standard Time time zone
            SimpleTimeZone pdt = new SimpleTimeZone(-8 * 60 * 60 * 1000, ids[0]);
    // set up rules for daylight savings time
            pdt.setStartRule(Calendar.APRIL, 1, Calendar.SUNDAY, 2 * 60 * 60 * 1000);
            pdt.setEndRule(Calendar.OCTOBER, -1, Calendar.SUNDAY, 2 * 60 * 60 * 1000);
    // create a GregorianCalendar with the Pacific Daylight time zone
    // and the current date and time
            Calendar calendar = new GregorianCalendar(pdt);
            Date trialTime = new Date();
            calendar.setTime(trialTime);
    // Change month numbering to 1-12
            int monthNumber = calendar.get(Calendar.MONTH)+1;
    // begin output
            System.out.println("Current Time");
    // print out a bunch of interesting things
            System.out.println("ERA: " + calendar.get(Calendar.ERA));
            System.out.println("YEAR: " + calendar.get(Calendar.YEAR));
            System.out.println("MONTH: " + monthNumber);
            System.out.println("WEEK_OF_YEAR: " + calendar.get(Calendar.WEEK_OF_YEAR));
            System.out.println("WEEK_OF_MONTH: " + calendar.get(Calendar.WEEK_OF_MONTH));
            System.out.println("DATE: " + calendar.get(Calendar.DATE));
            System.out.println("DAY_OF_MONTH: " + calendar.get(Calendar.DAY_OF_MONTH));
            System.out.println("DAY_OF_YEAR: " + calendar.get(Calendar.DAY_OF_YEAR));
            System.out.println("DAY_OF_WEEK: " + calendar.get(Calendar.DAY_OF_WEEK));
            System.out.println("DAY_OF_WEEK_IN_MONTH: " +
                calendar.get(Calendar.DAY_OF_WEEK_IN_MONTH));
            System.out.println("AM_PM: " + calendar.get(Calendar.AM_PM));
            System.out.println("HOUR: " + calendar.get(Calendar.HOUR));
            System.out.println("HOUR_OF_DAY: " + calendar.get(Calendar.HOUR_OF_DAY));
            System.out.println("MINUTE: " + calendar.get(Calendar.MINUTE));
            System.out.println("SECOND: " + calendar.get(Calendar.SECOND));
            System.out.println("MILLISECOND: " + calendar.get(Calendar.MILLISECOND));
            System.out.println("ZONE_OFFSET: " +
                (calendar.get(Calendar.ZONE_OFFSET) / (60 * 60 * 1000)));
            System.out.println("DST_OFFSET: " +
                (calendar.get(Calendar.DST_OFFSET) / (60 * 60 * 1000)));
            System.out.println("Current Time, with hour reset to 3");
            calendar.clear(Calendar.HOUR_OF_DAY);
            // so doesn't override
            calendar.set(Calendar.HOUR, 3);
            System.out.println("ERA: " + calendar.get(Calendar.ERA));
            System.out.println("YEAR: " + calendar.get(Calendar.YEAR));
            System.out.println("MONTH: " + calendar.get(Calendar.MONTH));
            System.out.println("WEEK_OF_YEAR: " + calendar.get(Calendar.WEEK_OF_YEAR));
            System.out.println("WEEK_OF_MONTH: " + calendar.get(Calendar.WEEK_OF_MONTH));
            System.out.println("DATE: " + calendar.get(Calendar.DATE));
            System.out.println("DAY_OF_MONTH: " + calendar.get(Calendar.DAY_OF_MONTH));
            System.out.println("DAY_OF_YEAR: " + calendar.get(Calendar.DAY_OF_YEAR));
            System.out.println("DAY_OF_WEEK: " + calendar.get(Calendar.DAY_OF_WEEK));
            System.out.println("DAY_OF_WEEK_IN_MONTH: " +
                calendar.get(Calendar.DAY_OF_WEEK_IN_MONTH));
            System.out.println("AM_PM: " + calendar.get(Calendar.AM_PM));
            System.out.println("HOUR: " + calendar.get(Calendar.HOUR));
            System.out.println("HOUR_OF_DAY: " + calendar.get(Calendar.HOUR_OF_DAY));
            System.out.println("MINUTE: " + calendar.get(Calendar.MINUTE));
            System.out.println("SECOND: " + calendar.get(Calendar.SECOND));
            System.out.println("MILLISECOND: " + calendar.get(Calendar.MILLISECOND));
            System.out.println("ZONE_OFFSET: " +
                (calendar.get(Calendar.ZONE_OFFSET) / (60 * 60 * 1000)));
            // in hours
            System.out.println("DST_OFFSET: " +
                (calendar.get(Calendar.DST_OFFSET) / (60 * 60 * 1000)));
            // in hours
    }

  • Which application should i use to install facetime

    which application should I use to install facetime?

    You can save the DMG file for Mac to the desktop and install the Firefox application.
    * [[Installing Firefox on Mac]]
    * http://kb.mozillazine.org/Installing_Firefox#Mac_OS_X

  • I want to convert a pdf file into xml.Which programme should I use and how do I access it?

    I want to convert a pdf file into xml.Which programme should I use and how do I access it?I am based in India.

    Hello,
    if you create your doc files by the help of WORD, you could use a Microsoft add on (it depends of your WORD Version).
    Hans-Günter

  • Which situation should we use the text item with the item category TATX

    Dear experts!
    Thank you for your attention!
    I am confused with text item (TATX).
    which situation should we use the text item with the item category TATX????
    Someone told me that the text item is dummy and should be used as a manual of certain standard item. But the manual may be a book or several papers and it also takes up some inventory not a dummy.
    So, could some body tell me what the text item (TATX) exact is and what function it has.
    Best regard!
    Tangdark

    Hi,
    you can use TATX if you like to enter a text and to print some information between the item lines.
    Regards
    William

  • To create a web page which application should I use?

    I'm a graphic designer who works with illustrator, indesign and photoshop. To create a web page which application should I use?

    Muse (aimed at novices) or Dreamweaver (aimed at web professionals familiar with web code)

  • Which object should i use ?

    Hi,
    I have a methode that returns several values of different types. Which objet should I use to return these values ? I thought of Vector but somebody told me that there is a better object than Vector.
    thanks for your help !
    Tex

    First, always use an interface over an object if it exists. So, your code should always declare the instance variable as List, not ArrayList or Vector or LinkedList. This allows the implementation to be optimized for the task at hand (e.g. LinkedList for arbitrary insertions or deletions of data, ArrayList for better Iterator performance, etc.) while using the interface for the common List methods (e.g., get(), add(), remove(), iterator(), etc.)
    Second, avoid Vector. Sun specifically states in the Collections tutorial that ArrayList is preferred over Vector.
    - Saish
    "My karma ran over your dogma." - Anon

  • Which listener should I use?

    Now I want to listen the JFrame's location changing event. Which listener should i use?

    Add a ComponentListener to the JFrame

  • HT3669 which driver should i use for the epson LX300 matrix-dot printer??

    which driver should i use for the epson LX300 matrix-dot printer??? I dowloaded all drivers for epson but i didn't find the driver for the LX300.
    I bought an i mac not so long ago, can anyone help me about this?

    i use parallels desktop 7 because i use a program for work with windows XP. Is there really no solution?

  • Which forum should I use if I have JSP questions?

    Hi, pals!
    Which forum should I use if I have JSP questions?
    Cheers,
    George

    http://forum.java.sun.com/forum.jsp?forum=45

Maybe you are looking for

  • HTTP Test Tool Umlaut (Special Character) Problem iso-8859-1 utf-8

    Hi folks, I habe a Problem in an HTTP to IDOC Scenario. The configuration works and when I test it, by using the Test Message Tool from the Runtime Workbench i get the following problem: I post an IDOC XML Charset iso-8859-1 when it arrive as IDoc in

  • Digital Audio I/O Question

    Can the digital audio in/out ports on the Mac Pro pass 192kHz spdif signal? Thanks!   Mac OS X (10.4.9)  

  • Using an external cd-rom  for  re-installing  the os X?

    hello, i have a problem , my superdrive it`s not working, and i don`t want to replace the unit, i have an external cd-rom an want to know if i can re-installing or re-boot it from the external drive. please help me,... i need to errase evrything from

  • Iframe redirect javascript help please

    Hi: My client uses a loan application on another service's site, and I embedded the form in an iFrame to keep the user on my client's site. At the Submit of the form, it redirects to the client's home page, but it does it within the confines of the f

  • Blue Hyperlinks is iWeb

    I am on iWeb 06. Why are my hyperlinks NOT Blue. I use the Inspector and am not able to color the text hyperlink Blue. What am I not seeing. thanks you. http://web.mac.com/hdayala/iWeb/Site/Welcome.html