<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Java source code examples &#187; java.io</title>
	<atom:link href="http://www.javacodez.com/code/topics/javaio/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.javacodez.com/code</link>
	<description>Java source code samples. Java code examples.</description>
	<lastBuildDate>Fri, 14 May 2010 10:50:50 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=abc</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Create a StringWriter object</title>
		<link>http://www.javacodez.com/code/javaio/create-a-stringwriter-object/</link>
		<comments>http://www.javacodez.com/code/javaio/create-a-stringwriter-object/#comments</comments>
		<pubDate>Thu, 23 Oct 2008 09:55:20 +0000</pubDate>
		<dc:creator>Albin Joseph</dc:creator>
				<category><![CDATA[java.io]]></category>
		<category><![CDATA[java.io.StringWriter]]></category>
		<category><![CDATA[StringWriter]]></category>
		<category><![CDATA[StringWriter class examples]]></category>
		<category><![CDATA[StringWriter examples]]></category>

		<guid isPermaLink="false">http://www.javacodez.com/code/?p=305</guid>
		<description><![CDATA[The default constructor allows us to create a StringWriter with default string buffer size.

import java.io.StringWriter;

/**
 * StringWriter class examples.
 */
public class StringWriterExample {
	public static void main(String[] args){
		// Create a stringWriter object.
		StringWriter writer = new StringWriter();
	}
}

]]></description>
		<wfw:commentRss>http://www.javacodez.com/code/javaio/create-a-stringwriter-object/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Compare two files using java</title>
		<link>http://www.javacodez.com/code/javaio/compare-two-files-using-java/</link>
		<comments>http://www.javacodez.com/code/javaio/compare-two-files-using-java/#comments</comments>
		<pubDate>Tue, 24 Jun 2008 16:10:16 +0000</pubDate>
		<dc:creator>Albin Joseph</dc:creator>
				<category><![CDATA[java.io]]></category>
		<category><![CDATA[File]]></category>
		<category><![CDATA[file class examples]]></category>
		<category><![CDATA[File examples]]></category>
		<category><![CDATA[java.io.File]]></category>

		<guid isPermaLink="false">http://www.javacodez.com/code/javaio/compare-two-files-using-java/</guid>
		<description><![CDATA[Compare two files using java
The compareTo method of File class helps us to create a temporary file. This method returns an integer. If the value of the integer is greater than zero, the file will be greater than the argument, if the file is less than zero, the file will be less than the argument [...]]]></description>
		<wfw:commentRss>http://www.javacodez.com/code/javaio/compare-two-files-using-java/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Create a temp file using java</title>
		<link>http://www.javacodez.com/code/javaio/create-a-temp-file-using-java/</link>
		<comments>http://www.javacodez.com/code/javaio/create-a-temp-file-using-java/#comments</comments>
		<pubDate>Tue, 24 Jun 2008 16:09:32 +0000</pubDate>
		<dc:creator>Albin Joseph</dc:creator>
				<category><![CDATA[java.io]]></category>
		<category><![CDATA[File]]></category>
		<category><![CDATA[file class examples]]></category>
		<category><![CDATA[File examples]]></category>
		<category><![CDATA[java.io.File]]></category>

		<guid isPermaLink="false">http://www.javacodez.com/code/?p=303</guid>
		<description><![CDATA[Create a temp file using java
The createTempFile method of File class helps us to create a temporary file.

import java.io.File;
import java.io.IOException;
/**
 * File class examples.
 *
 */
public class FileExample  {
	public static void main(String[] args) throws IOException{
		// Create file object representing the source file/directory
		File file = new File("d:\\temp");

		// Create the temporary file.
		File tempFile = File.createTempFile("test", ".tmp",file);
	}
}

]]></description>
		<wfw:commentRss>http://www.javacodez.com/code/javaio/create-a-temp-file-using-java/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Finds out total used space in a partition using java</title>
		<link>http://www.javacodez.com/code/javaio/finds-out-total-used-space-in-a-partition-using-java/</link>
		<comments>http://www.javacodez.com/code/javaio/finds-out-total-used-space-in-a-partition-using-java/#comments</comments>
		<pubDate>Tue, 24 Jun 2008 16:08:17 +0000</pubDate>
		<dc:creator>Albin Joseph</dc:creator>
				<category><![CDATA[java.io]]></category>
		<category><![CDATA[File]]></category>
		<category><![CDATA[file class examples]]></category>
		<category><![CDATA[File examples]]></category>
		<category><![CDATA[java.io.File]]></category>

		<guid isPermaLink="false">http://www.javacodez.com/code/javaio/finds-out-total-used-space-in-a-partition-using-java/</guid>
		<description><![CDATA[Finds out total used space in a partition using java
In Java we can find the total used space of any drive or partition using getTotalSpace and getFreeSpace methods.

import java.io.File;
/**
 * File class examples.
 *
 */
public class FileExample  {
	public static void main(String[] args){
		// Create file object representing the source file/directory
		File file = new File("d:\\temp\\test.txt");

		// Get [...]]]></description>
		<wfw:commentRss>http://www.javacodez.com/code/javaio/finds-out-total-used-space-in-a-partition-using-java/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Finds out total usable space available in a partition using java</title>
		<link>http://www.javacodez.com/code/javaio/finds-out-total-usable-space-available-in-a-partition-using-java/</link>
		<comments>http://www.javacodez.com/code/javaio/finds-out-total-usable-space-available-in-a-partition-using-java/#comments</comments>
		<pubDate>Tue, 24 Jun 2008 16:07:33 +0000</pubDate>
		<dc:creator>Albin Joseph</dc:creator>
				<category><![CDATA[java.io]]></category>
		<category><![CDATA[File]]></category>
		<category><![CDATA[file class examples]]></category>
		<category><![CDATA[File examples]]></category>
		<category><![CDATA[java.io.File]]></category>

		<guid isPermaLink="false">http://www.javacodez.com/code/javaio/finds-out-total-usable-space-available-in-a-partition-using-java/</guid>
		<description><![CDATA[Finds out total usable space available in a partition using java
The getUsableSpace method of File class can be used for getting the total usable space available in a partition or drive using java.

import java.io.File;
/**
 * File class examples.
 *
 */
public class FileExample  {
	public static void main(String[] args){
		// Create file object representing the source file/directory
		File [...]]]></description>
		<wfw:commentRss>http://www.javacodez.com/code/javaio/finds-out-total-usable-space-available-in-a-partition-using-java/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Finds out total free space available in a partition using java</title>
		<link>http://www.javacodez.com/code/javaio/finds-out-total-free-space-available-in-a-partition-using-java/</link>
		<comments>http://www.javacodez.com/code/javaio/finds-out-total-free-space-available-in-a-partition-using-java/#comments</comments>
		<pubDate>Tue, 24 Jun 2008 16:06:48 +0000</pubDate>
		<dc:creator>Albin Joseph</dc:creator>
				<category><![CDATA[java.io]]></category>
		<category><![CDATA[File]]></category>
		<category><![CDATA[file class examples]]></category>
		<category><![CDATA[File examples]]></category>
		<category><![CDATA[java.io.File]]></category>

		<guid isPermaLink="false">http://www.javacodez.com/code/?p=300</guid>
		<description><![CDATA[Finds out total free space available in a partition using java
The getFreeSpace method of File class can be used for getting the total free space available in a partition or drive using java.

import java.io.File;
/**
 * File class examples.
 *
 */
public class FileExample  {
	public static void main(String[] args){
		// Create file object representing the source file/directory
		File [...]]]></description>
		<wfw:commentRss>http://www.javacodez.com/code/javaio/finds-out-total-free-space-available-in-a-partition-using-java/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Finds out total space available in a partition using java</title>
		<link>http://www.javacodez.com/code/javaio/finds-out-total-space-available-in-a-partition-using-java/</link>
		<comments>http://www.javacodez.com/code/javaio/finds-out-total-space-available-in-a-partition-using-java/#comments</comments>
		<pubDate>Tue, 24 Jun 2008 16:05:55 +0000</pubDate>
		<dc:creator>Albin Joseph</dc:creator>
				<category><![CDATA[java.io]]></category>
		<category><![CDATA[File]]></category>
		<category><![CDATA[file class examples]]></category>
		<category><![CDATA[File examples]]></category>
		<category><![CDATA[java.io.File]]></category>

		<guid isPermaLink="false">http://www.javacodez.com/code/?p=299</guid>
		<description><![CDATA[Finds out total space available in a partition using java
The getTotalSpace method of File class can be used for getting the total space available in a partition or drive using java.

import java.io.File;
/**
 * File class examples.
 *
 */
public class FileExample  {
	public static void main(String[] args){
		// Create file object representing the source file/directory
		File file = [...]]]></description>
		<wfw:commentRss>http://www.javacodez.com/code/javaio/finds-out-total-space-available-in-a-partition-using-java/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Lists all the drives present in Windows using java</title>
		<link>http://www.javacodez.com/code/javaio/lists-all-the-drives-present-in-windows-using-java/</link>
		<comments>http://www.javacodez.com/code/javaio/lists-all-the-drives-present-in-windows-using-java/#comments</comments>
		<pubDate>Tue, 24 Jun 2008 16:04:48 +0000</pubDate>
		<dc:creator>Albin Joseph</dc:creator>
				<category><![CDATA[java.io]]></category>
		<category><![CDATA[File]]></category>
		<category><![CDATA[file class examples]]></category>
		<category><![CDATA[File examples]]></category>
		<category><![CDATA[java.io.File]]></category>

		<guid isPermaLink="false">http://www.javacodez.com/code/?p=298</guid>
		<description><![CDATA[Lists all the drives present in Windows using java
The listRoots method of File class is used for finding out all the drives available in Windows.

import java.io.File;
/**
 * File class examples.
 *
 */
public class FileExample  {
	public static void main(String[] args){
		// Get all the drives
		File drives[] = File.listRoots();

		// Loop through the drive list and display the [...]]]></description>
		<wfw:commentRss>http://www.javacodez.com/code/javaio/lists-all-the-drives-present-in-windows-using-java/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Checks whether a file or directory has executable permission or not.</title>
		<link>http://www.javacodez.com/code/javaio/checks-whether-a-file-or-directory-has-executable-permission-or-not/</link>
		<comments>http://www.javacodez.com/code/javaio/checks-whether-a-file-or-directory-has-executable-permission-or-not/#comments</comments>
		<pubDate>Tue, 24 Jun 2008 16:03:39 +0000</pubDate>
		<dc:creator>Albin Joseph</dc:creator>
				<category><![CDATA[java.io]]></category>
		<category><![CDATA[File]]></category>
		<category><![CDATA[file class examples]]></category>
		<category><![CDATA[File examples]]></category>
		<category><![CDATA[java.io.File]]></category>

		<guid isPermaLink="false">http://www.javacodez.com/code/?p=297</guid>
		<description><![CDATA[Checks whether a file or directory has executable permission or not.
The canExecute method of File class can be used for finding out whether the given file has executable permission or not.

import java.io.File;
/**
 * File class examples.
 *
 */
public class FileExample  {
	public static void main(String[] args){
		// Create file object representing the source file/directory
		File file = [...]]]></description>
		<wfw:commentRss>http://www.javacodez.com/code/javaio/checks-whether-a-file-or-directory-has-executable-permission-or-not/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Change file or directory permission only to owner using java</title>
		<link>http://www.javacodez.com/code/javaio/change-file-or-directory-permission-only-to-owner-using-java/</link>
		<comments>http://www.javacodez.com/code/javaio/change-file-or-directory-permission-only-to-owner-using-java/#comments</comments>
		<pubDate>Tue, 24 Jun 2008 16:02:48 +0000</pubDate>
		<dc:creator>Albin Joseph</dc:creator>
				<category><![CDATA[java.io]]></category>
		<category><![CDATA[File]]></category>
		<category><![CDATA[file class examples]]></category>
		<category><![CDATA[File examples]]></category>
		<category><![CDATA[java.io.File]]></category>

		<guid isPermaLink="false">http://www.javacodez.com/code/?p=296</guid>
		<description><![CDATA[Change file or directory permission only to owner using java
The setReadOnly, setWritable,setReadable and setExecutable methods of the file class is used for changing the permissions on a file only to owner of the file or directory.

import java.io.File;
/**
 * File class examples.
 *
 * The class sets read only, writable, executable and readable permissions
 * for [...]]]></description>
		<wfw:commentRss>http://www.javacodez.com/code/javaio/change-file-or-directory-permission-only-to-owner-using-java/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
