iso8211 0-1-0 by Weft

uk.co.weft.iso8211
Class Directory

java.lang.Object
  |
  +--uk.co.weft.iso8211.Directory

public class Directory
extends java.lang.Object

The directory of an ISO 8211 record.

Version:
$Revision: 1.2 $ This revision: $Author: simon $
  $Log: Directory.java,v $
  Revision 1.2  2002/11/02 00:09:16  simon
  Promising, but still not there. Problems include not correctly finding
  the start of the next record.

  Revision 1.1.1.1  2002/10/29 11:27:33  simon
  More or less parses


  
Author:
Simon Brooke (simon@jasmine.org.uk)

Field Summary
protected  long position
          the position at which I was found in the input stream
protected  Record record
          the record I am in
 
Constructor Summary
Directory(ISO8211InputStream in, Record record, Record ddr, boolean debug)
          Create a new directory by parsing from the current position in this stream.
 
Method Summary
protected  int getLength(int index)
          Get the length of my indexth entry.
protected  int getPosition(int index)
          Get the offset of my indexth entry.
protected  java.lang.String getTag(int index)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

record

protected Record record
the record I am in

position

protected long position
the position at which I was found in the input stream
Constructor Detail

Directory

public Directory(ISO8211InputStream in,
                 Record record,
                 Record ddr,
                 boolean debug)
          throws java.lang.Exception
Create a new directory by parsing from the current position in this stream.
Parameters:
in - the stream to parse from
record - the record of which I form a part
ddr - the ddr for the file I am in
debug - whether I'm in debug mode
Method Detail

getTag

protected java.lang.String getTag(int index)
Returns:
the tag of my indexth entry, if I have one, else null

getPosition

protected int getPosition(int index)
Get the offset of my indexth entry. Probably not very useful because I can't really fseek().
Returns:
the offset of my indexth entry, if I have one, else -1

getLength

protected int getLength(int index)
Get the length of my indexth entry.
Returns:
the offset of my indexth entry, if I have one, else -1

iso8211 0-1-0 by Weft