How to download video files using java

hi,
i am designing a download manager using java. Although i am able to download html pages and images as of now, i am facing problems while downloading the video files. Can somebody please guide me as to how to do this.
Thanks in advance,
Arun

All types of data should be downloaded in same way. What is your problem: exception or something else? Post here.

Similar Messages

  • How to download video files using http urls through OSB

    Hi all,
    I am working on a requirement where I need to download the video using http url of that video through OSB. Is it possible to convert the video files hosted in a server into base64 code using OSB ? Kindly help me on this.
    Thanks
    Edited by: 887737 on Jul 25, 2012 3:26 AM

    Hi,
    I believe you can get the video file using file transport and then convert it into base64 using a java call out...
    This may help...
    https://blogs.oracle.com/ateamsoab2b/entry/an_example_of_how_to
    Cheers,
    Vlad

  • How to run .jar on linux & how to create .jar file using java?

    hi, may i know how to run .jar on linux & how to create .jar file using java? Can u provide the steps on doing it.
    thanks in advance.

    Look at the manual page for jar:
    # man jar
    Also you can run them by doing:
    # java -jar Prog.jar

  • How to print PDF files using java print API

    Hi,
    I was goign throw lot of discusion and reading lot of forums related to print pdf files using java api. but nothing seems to be working for me. Can any one tell me how to print pdf files using java api.
    Thanks in advance

    Mike,
    Can't seem to get hold of the example described in your reply below. If you could let us have the URL to get then it would be great.
    My GUI application creates a pdf document which I need to print. I want to achieve this using the standard Java class PrinterJob (no 3rd party APIs I'm afraid, commercial restraints etc ..). I had a stab at it using the following code. When executed I get the pretty printer dialog then when I click ok to print, nothing happens!
    boolean showPrintDialog=true;
    PrinterJob printJob = PrinterJob.getPrinterJob ();
    printJob.setJobName ("Contract.pdf");
    try {
    if (showPrintDialog) {
    if (printJob.printDialog()) {
    printJob.print();
    else
    printJob.print ();
    } catch (Exception PrintException) {
                   PrintException.printStackTrace();
    Thank you and a happy new year.
    Cheers,
    Chris

  • How to open/read file using Java in Unix?

    Hi Friends,
    Can you please help me out how to open/read file using java in unix os? I have create one text file in "/home/test.txt" in unix environment. How to open the same file & read using java code?
    - Hiren Modi

    http://java.sun.com/docs/books/tutorial/essential/io/index.html

  • How to uncompress zip files using java program

    hai,
    please give some sample code to decompress the zip file.
    how to uncompress zip files using java program
    thanking you
    arivarasu

    http://developer.java.sun.com/developer/technicalArticles/Programming/PerfTuning/
    Scroll down to 'Compression'

  • How to read pdf files using java.io package classes

    Dear All,
    I have a certain requirement that i should read and write PDF files at runtime. With normal java file IO reading is not working. Can any one suggest me how to proceed probably with sample code block
    Thanks in advance.

    hi I also have the pbm. to read pdf file using JAVA
    can any body help meWhy is it so difficult to read the thread you posted in? They say: java.io is pointless, use iText. So why don't you?
    or also I want to read a binary encoded data into
    ascii,
    can anybody give me a hint how to do it.Depends on what you mean with "binary encoding". ASCII's binary encoding, too, basically.

  • How to download a file using servlet

    I have a problem about downloading a file using a servlet.
    Anybody can help me?
    Thanks

    I am assuming that you want to write a servlet that, when invoked by a user (for instance, through a URL link), will download a file using the "save as" dialog (on Windows, for example) in the user's browser.
    In such a case, all you need to do is get the OutputStream from the response object, set the proper MIME type header, and write the file. Here is an (untested, not even compiled) skeleton.
    public class MyServlet extends HttpServlet {
    protected void doGet (HttpServletRequest req, HttpServletResponse resp)
    throws ServletException, IOException {
    ServletOutputStream out = resp.getOutputStream ();
    resp.setContentType ("application/x-foobar");
    while (/* whatever */) {
    In this loop, you generate your "file's" data.
    You can compute it on the fly, pull it from a database,
    read it from a "real" file, or any other means you can dream up.
    The sample line below just writes some of the data (for example,
    a byte array) to the user's browser via the output stream out.
    out.write (data);
    out.flush ();
    Go to http://java.sun.com/j2ee/sdk_1.3/techdocs/api/index.html
    for the JavaDoc on the classes used.
    Cheers!
    Jerry Oberle

  • How to load avi files using java ?

    Hi, i need to load avi (movie file) using java. I have usually done with java applet, but the applet just can load image (jpeg, gif)

    All types of data should be downloaded in same way. What is your problem: exception or something else? Post here.

  • How to gzip a file using java

    Friends,
    I want to gzip a file in unix using my java program, can I use Runtime.exec() method and run the gzip command to achieve this ?
    Is there any other way to zip/compress a file using java api ?
    Thanks

    Use [url http://java.sun.com/j2se/1.5.0/docs/api/java/util/zip/GZIPOutputStream.html]java.util.zip.GZIPOutputStream along with [url http://java.sun.com/j2se/1.5.0/docs/api/java/io/FileOutputStream.html]java.io.FileOutputStream

  • How to get started with playing a video file using Java on JSF page ?

    Hi ,
    I am developing a JSF (Java Server Faces) page.
    I need to develop following functionalities
    1). play video file on web page
    2). Let the user load video file into the system from a web page and that can stored in a database .
    Please guide me on how to do the above or where to get started .
    Thanks,

    hello brother
    I am also doing work on it.....but don't reach at any result plz help me if you have something
    [email protected]

  • How to upload a file using java bean?

    hi,
    i need a code simple how to upload a file from jsp form to a java bean file (not a servlet)
    thank,s zik

    Hi,
    i need a code sample how to upload a file from jsp
    form to a java bean file (not a servlet)You can use jspSmartUpload component which is a free, fully-featured JSP component.
    jspSmartUpload provides you with all the upload/download features you could possibly wish for :
    * Simple and complete upload
    * Total control over the upload process
    * �Mixed forms� management
    * Total control over files sent
    * Download whatever you want
    For further information about jspSmartUpload please visit
    http://www.jspsmart.com/
    Hope this helps.
    Good Luck.
    Gayam.Srinivasa Reddy
    Developer Technical Support
    Sun Micro Sysytems
    http://www.sun.com/developers/support/

  • Can u please send me a sample code to upload and download a file using java

    Hi,
    Please can u send me a sample code to upload a file and to download the same file from a remote server using a java servlets. The file should be read byte by byte.
    Message was edited by:
    user461713

    Hi, Thank u.
    Sorry, I forgot to attach a code. Here it is.
    Actually i need to upload a file to a remote server and download it from a server to my machine. I'm trying it using servlets and using tomcat5.0 as a servlet container. Here i'm sening a code used to upload a file. Let me know whether it works. Only few lines are here.
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.lang.Object;
    import java.util.*;
    import java.lang.String;
    import com.oreilly.servlet.MultipartRequest;
    public class FileUpload extends HttpServlet{
         public void doPost(HttpServletRequest req, HttpServletResponse res)throws
         ServletException, IOException{
         MultipartRequest multi=new MultipartRequest(req);     
         String file="file1";
         byte[] b=file.getBytes();
         InputStream in=null;
         BufferedInputStream bis=null;
         FileWriter fw=null;
    try{
         in=multi.getInputStream("file1");
    bis=new BufferedInputStream(in);
         File output=new File("/fileuploadtest");
         fw=new FileWriter(output);
              int i;
              i=bis.read();
              while (i != -1) {
    fw.write(i);
    i = bis.read();
         catch(IOException e){
              System.out.println("Exception=" +e);
    finally{
         try{
              if(in!=null)
              in.close();
              if(bis!=null)               
              bis.close();
              if(fw!=null)
              fw.close();
         catch(Exception e){
              System.out.println(e);
    This code is giving error as: cannot resolve symbol: class MultipartRequest
    Why is this happening?
    Pls let me know whether this code works or no and also i have written form.html.
    Can u pls tel me whether there are ways in which i can write a code to upload a file using servlets without using third party packages. Pls help.
    Also how should be the servlet mapping for this code.?
    Regards
    Message was edited by:
    user461713

  • How to play movie file using java tv

    hi,
    i am trying to play movie file(.mov or mpg or mp3) using java tv in linux plotform and also using jmf jar.
    problem is while running appear black screen and getting exception or errors like
    Unable to handle format: ima4, 480x320, FrameRate=25.0, Length=460800 0 extra bytes
    Thank in adv

    Well...
    I don't know how to load and play a video with JavaTV. But I've seen some posts telling that .mpg files aren't accepted by the JavaTV.
    Some people said that I had to use .avi files and these .avi files, if they were converted from a .mpg file, must had been converted with the Cinepack technology, but I don't know how to do this.
    If you find out how to load and play a video, I'd like to know, please send me an email or access my page and post there in the comments, so I can continue doing my application with a video.
    []'s
    Cauane B.S.
    Computer Science
    CNPq Researcher - TVDi
    http://cauanebs.blogspot.com
    UCPel - Pelotas - RS

  • How to hide hidden files using java FileSystemView

    My application has a browser. I use the following method from FileSystemView
    public File[] getFiles(File dir,
    boolean useFileHiding)
    with false as the second argument so that the browser doesn't display hidden files.
    It doesn't work completely.
    I found out there are two types of hidden files in Mac. the ones that being with "." (unix based) and the ones that have an invisibility attribute for the meta of the file (folders like /usr, /bin, /tmp, /etc).
    The getFiles filter works only for hidden files that start with "." but it still shows the second type of hidden files.
    For the second type of hidden files in Mac, how can I get the invisibility file attribute information in Java so that I can hide them from the file browser?
    thanks,

    The GetFileInfo tool that ships with the XCode Tools can display the file's information. Additionally, the SetFile tool allows setting those flags. How you use java to implement those, I suggest you ask at the Unix forum under OS X Technologies.

Maybe you are looking for

  • An arrow in a Tab Bar (View Stack)

    Hi    Is there a way to add an image next to the label of the selected tab in the ViewStack. ? Any ideas? thanks Dharmesh

  • "No airport card is installed" when power adapter is not connected

    Hi I am getting the "No Airport Card is Installed' message whenever my Macbook Pro does not have the power adapter connected. When the power is connected everything works fine. If it is disconnected, the airport icon turns grey, airport disappears, a

  • USB Key Not Ejecting Properly

    Hi, My U3 USB key/drive is not ejecting properly from my Mac Pro. (OS X 10.4.9, 5GB RAM, 3 HD's). When I click "Eject" the icon on the desk top disappears, and the light on the drive goes into 'sleep' mode (indicating it is still connected to the com

  • Missing wagetypes during selection by print program with HRFORMS

    Hi Folks we have a problem with selecting wagetypes for the form payslip via the HR-Formular-Workplace. On the block 'basis dedctions' e.g. we use wagetype '/5B1'. The wagetype is described on the table strip 'selections' of the block, accordingly. I

  • REST API for audit log events

    How can I execute audit log report using REST API. If it is not possible is there any other ways to retrieve all audit log events(Upload/download/delete/share/login/logout) using REST API.