Inputstream...help me...

Discussion in 'Java' started by gbattine, Jun 6, 2006.

  1. gbattine

    gbattine Guest

    Hi guys,
    i've a question for you.
    My Jsf Application allow user to upload a txt file thanks to a Myfaces
    component.
    I want manipulate later this file and i know that exist getInputStream
    function that allow it.
    My question is that i have to add to my application a java class that
    does some operations on the file that i have uploaded.
    The matter is that my application load a file in a bufferedReader with

    BufferedReader br = new BufferedReader(file);


    How can i put the inputstream of my uploaded file in the bufferedReader

    to reuse my java application?
    Please help me,i'm a newbie..excuse me for my english
    gbattine, Jun 6, 2006
    #1
    1. Advertising

  2. You can e.g. use:

    http://java.sun.com/j2se/1.5.0/docs/api/java/io/InputStreamReader.html

    i.e. something like:

    .... = new BufferedReader(new InputStreamReader(fileinputstream));

    gbattine wrote:
    > Hi guys,
    > i've a question for you.
    > My Jsf Application allow user to upload a txt file thanks to a Myfaces
    > component.
    > I want manipulate later this file and i know that exist getInputStream
    > function that allow it.
    > My question is that i have to add to my application a java class that
    > does some operations on the file that i have uploaded.
    > The matter is that my application load a file in a bufferedReader with
    >
    > BufferedReader br = new BufferedReader(file);
    >
    >
    > How can i put the inputstream of my uploaded file in the bufferedReader
    >
    > to reuse my java application?
    > Please help me,i'm a newbie..excuse me for my english
    >
    Peter Van Weert, Jun 6, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Brian Birtle
    Replies:
    2
    Views:
    1,994
    John Saunders
    Oct 16, 2003
  2. R
    Replies:
    5
    Views:
    2,101
    Kevin McMurtrie
    Mar 13, 2005
  3. Replies:
    2
    Views:
    2,361
  4. Replies:
    8
    Views:
    1,076
    Roedy Green
    Feb 14, 2006
  5. gbattine
    Replies:
    0
    Views:
    1,132
    gbattine
    Jun 5, 2006
Loading...

Share This Page