Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Java and JDK > Java Basics
|
Java Basics General beginning Java language questions that don't fit in one of the more specific forums. Please specify what version.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Java Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 7th, 2008, 01:34 AM
Authorized User
 
Join Date: Oct 2007
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to hafizmuhammadmushtaq Send a message via Yahoo to hafizmuhammadmushtaq
Default how to creat a file object

i want to Create a new File object and create a new FileInputStream object and pass the file object to it............i dont know how to do it...........can anyone help????????


 
Old April 7th, 2008, 03:02 AM
jomet
Guest
 
Posts: n/a
Default

creating file object
File file = new File("C:\\MyFile.txt");

check a sample pgm
http://www.java-tips.org/java-se-tip...e-in-java.html

jomet.
---------------------------------------------
Once you start a working on something,
dont be afraid of failure and dont abandon it.
People who work sincerely are the happiest.
 
Old April 7th, 2008, 07:18 AM
Authorized User
 
Join Date: Oct 2007
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to hafizmuhammadmushtaq Send a message via Yahoo to hafizmuhammadmushtaq
Default

thax for the help.........but i want to pass this file object to FileInputStream.........can u tell me, how can i do this?

 
Old April 8th, 2008, 02:42 AM
jomet
Guest
 
Posts: n/a
Default

 FileInputStream fis = null;
fis = new FileInputStream(file);

jomet.
---------------------------------------------
Once you start a working on something,
dont be afraid of failure and dont abandon it.
People who work sincerely are the happiest.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Can´t creat excel file on a PC using ASP rtr1900 ASP.NET 2.0 Basics 6 October 29th, 2008 03:00 AM
Unable to creat new flat file connection cprinyarux BOOK: Professional SQL Server 2005 Integration Services ISBN: 0-7645-8435-9 1 August 1st, 2008 02:34 PM
how to creat crystal report file with php. malcomstewart Pro PHP 0 April 30th, 2008 07:49 AM
How to creat an user account prad_a PHP Databases 1 May 12th, 2007 03:25 AM
How do I creat a .dll file dbrooks Classic ASP Components 1 July 8th, 2006 03:29 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.