Class InnB

java.lang.Object
  |
  +--inf101.Inn
        |
        +--InnB

class InnB
extends inf101.Inn

Utvider klassen Inn med metode for ? lese en kode p? opptil 21000 verdier p? fil i en eller to byter, og en metode for ? lese neste ord p? fila.


Constructor Summary
(package private) InnB()
           
(package private) InnB(java.lang.String s)
           
 
Method Summary
(package private)  int inKonv(int i)
          Avoids cotrol characters.
 int innKode()
          Reads next code from file.
 java.lang.String lesNesteOrd()
          Reads next word from file.
 
Methods inherited from class inf101.Inn
close, empty, endOfFile, flushLine, inChar, inChar, inDouble, inDouble, inInt, inInt, inString, inString, inStringLn, lastItem, lastItem, skipEmpty, skipSep, skipWhite, white
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InnB

InnB(java.lang.String s)

InnB

InnB()
Method Detail

inKonv

int inKonv(int i)
Avoids cotrol characters. : 10, 13, 128-160
Parameters:
i - a byte value read from file with inChar()
Returns:
'code' as used when calling corresponding utKonv(int code)

innKode

public int innKode()
Reads next code from file. : lower 100 values (2 digits in code) in byte 1. if value of code on file >= 100 then byte 1 > 100 and byte 2 = upper 3 digits (up to 210 values).
Returns:
max value = 210*100 (can easily be extended to 3,4.. byte encoding)

lesNesteOrd

public java.lang.String lesNesteOrd()
Reads next word from file. Skips whitespace as determined by parameter to inString()