public static String readStr31 ( final DataInput pStream ) throws IOException { String text = readPascalString ( pStream ) ; int length = 31 - text . length ( ) ; if ( length < 0 ) { throw new IOException ( "String length exceeds maximum (31): " + text . length ( ) ) ; } pStream . skipBytes ( length ) ; return text ; }
Reads a 32 byte fixed length Pascal string from the given input . The input stream must be positioned at the length byte of the text the text will be no longer than 31 characters long .