• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

File and FileDescriptor

 
Ranch Hand
Posts: 139
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi some basic questions.

1. - How File and FileDescriptors class are different in java
- What it represents.
- What we can not achive through File class,
we have to depend on "FileDescriptors"

2. What is Filter Streams ? Can you give me an example.

thanks in advance
siva
 
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The documentation answers all of your questions:
java.io.File

An abstract representation of file and directory pathnames.



java.io.FileDescriptor

The main practical use for a file descriptor is to create a FileInputStream or FileOutputStream to contain it.
Applications should not create their own file descriptors.



Filter streams are specalized streams which transform the data moving through them. There are examples in Java Tutorial
 
Siva kandasamy
Ranch Hand
Posts: 139
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Joe,
Thank You. Code appended here is example for Filter streams. Please help me to identify the transformation of data.
"which transform the data moving through them", what we mean here.
Thanks you
siva


 
Joe Ess
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
DataInputStream and DataOutputStream are transforming raw bytes into Java primitive types or vice-versa.
 
Siva kandasamy
Ranch Hand
Posts: 139
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank You Joe. I think, it makes sense. I will try more.
thanks
siva
 
reply
    Bookmark Topic Watch Topic
  • New Topic