Java I/O


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Java I/O

Hybrid View

  1. #1
    Bob Guest

    Java I/O


    MAy be somebody knows where I can find examples how to read from FIle in Java
    Thanks

  2. #2
    Fernando Ribeiro Guest

    Re: Java I/O


    "Bob" <ups2000@hotmail.com> wrote:
    >
    >MAy be somebody knows where I can find examples how to read from FIle in

    Java
    >Thanks


    To read a file using the classes in the JDK you need to create an instance
    of java.io.File (which will hold the file itself) and an instance of java.io.Reader
    (for character data) or java.io.InputStream (for raw binary data) or one
    of its subclasses.

    The java.io.FileReader ("@see Decorator pattern") and takes a java.io.File
    as a parameter of its constructor. Take a look at the JDK docs for information
    on the APIs of these classes.

    http://java.sun.com/docs

    Hope that helps.

    fribeiro


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center