The Artima Developer Community
Sponsored Link

Java Buzz Forum
Java program to read File in Java - Windows UNIX

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Javin Paul

Posts: 1090
Nickname: javinpaul
Registered: Jan, 2012

Javin Paul is Java Programmer working on Finance domain.
Java program to read File in Java - Windows UNIX Posted: Oct 4, 2012 7:59 AM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by Javin Paul.
Original Post: Java program to read File in Java - Windows UNIX
Feed Title: Java67
Feed URL: http://www.java67.com/feeds/posts/default?alt=rss
Feed Description: Java and technology tutorials, tips, questions for all programmers.
Latest Java Buzz Posts
Latest Java Buzz Posts by Javin Paul
Latest Posts From Java67

Advertisement


Java provides java.io  package in JDK API for reading File in Java from File system e.g. C:\ or D:\ drive in Windows or any other directory in UNIX. First you can use FileInputStream to open file for reading. FileInputStream takes a String parameter which is path for the file you want to read. Be careful while specifying File path as path separator is different on Window and UNIX. Windows uses back slash while UNIX uses forward slash as path separator. By the way Java supports forward slash in Windows, It means if use forward slash your program will work on both Windows and UNIX. Alternatively you can also get PATH separator from System property path.separator. In this Java tutorial we will code example of How to read File in Java.
Read more »

Read: Java program to read File in Java - Windows UNIX

Topic: Does Immutability really means Thread Safety? Previous Topic   Next Topic Topic: Test Driven Traps, part 2

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use