Reading the BAM or Directory

Discussion in 'Java' started by Raymond BARBER, Apr 27, 2010.

  1. Hi, can one of you nice folks give me a steer as to how to READ the BAM or
    directory of a disc and print out the result to the screen or a printer. I
    know it should be simple but having trouble finding info
    Thanks very much for any help

    REB
     
    Raymond BARBER, Apr 27, 2010
    #1
    1. Advertising

  2. Raymond BARBER

    Tom Anderson Guest

    On Tue, 27 Apr 2010, Raymond BARBER wrote:

    > Hi, can one of you nice folks give me a steer as to how to READ the BAM
    > or directory of a disc and print out the result to the screen or a
    > printer. I know it should be simple but having trouble finding info
    > Thanks very much for any help


    I'd start by trying a more appropriate newsgroup! Perhaps one to do with
    disks?

    tom

    --
    Get my pies out of the oven!
     
    Tom Anderson, Apr 27, 2010
    #2
    1. Advertising

  3. Raymond BARBER

    Lew Guest

    Raymond BARBER wrote:
    > Hi, can one of you nice folks give me a steer as to how to READ the BAM or
    > directory of a disc and print out the result to the screen or a printer. I
    > know it should be simple but having trouble finding info
    > Thanks very much for any help
    >


    I don't know what a "BAM" is, but try something like:

    for ( String name : new File( parentDirectoryName ).list() )
    {
    System.out.println( name );
    }

    along with appropriate exception handling.

    --
    Lew
     
    Lew, Apr 27, 2010
    #3
  4. Raymond BARBER

    Eric Sosman Guest

    On 4/27/2010 12:09 PM, Raymond BARBER wrote:
    > Hi, can one of you nice folks give me a steer as to how to READ the BAM or
    > directory of a disc and print out the result to the screen or a printer. I
    > know it should be simple but having trouble finding info


    See Tom Anderson's response. Also, be aware that some file
    systems maintain no such map explicitly, but use other data
    structures to keep track of what's in use and what's available.
    That is, you may need to read and interpret some data structure
    specific to the file system in order to deduce a map.

    Finally, note that the map (explicit or implicit) may be too
    large to make much sense as a printout: A terabyte drive, even
    coarsely divided into 8KB "blocks," has 134 million such blocks.

    --
    Eric Sosman
    lid
     
    Eric Sosman, Apr 27, 2010
    #4
  5. Raymond BARBER

    Arne Vajhøj Guest

    On 27-04-2010 12:09, Raymond BARBER wrote:
    > Hi, can one of you nice folks give me a steer as to how to READ the BAM or
    > directory of a disc and print out the result to the screen or a printer. I
    > know it should be simple but having trouble finding info
    > Thanks very much for any help


    BAM = Block allocation map ?

    Java would not be the right language for that.

    You can do:
    [Java]--(JNI call)-->[C/C++]--(call)-->[OS]
    to get the information but you could just as well
    write everything in C/C++.

    There are no problem getting a list of all files
    in a directory via Java (see the java.io.File class),
    but that does not solve the first problem.

    Arne
     
    Arne Vajhøj, Apr 28, 2010
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. TJS
    Replies:
    1
    Views:
    547
    Eliyahu Goldin
    Jun 23, 2004
  2. Jack Wright
    Replies:
    1
    Views:
    489
    sonikchopra
    Apr 19, 2005
  3. =?Utf-8?B?QmFzIEhlbmRyaWtz?=

    Directory and files names in temporary asp.net directory

    =?Utf-8?B?QmFzIEhlbmRyaWtz?=, Jan 28, 2005, in forum: ASP .Net
    Replies:
    5
    Views:
    898
    Juan T. Llibre
    Jan 31, 2005
  4. Steve Singer
    Replies:
    0
    Views:
    563
    Steve Singer
    Feb 15, 2005
  5. davidw
    Replies:
    2
    Views:
    570
    Brock Allen
    May 30, 2005
Loading...

Share This Page