DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
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


Bookmarks

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


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links