/** Skip n bytes within the stream. */ @Override public int skipBytes(int n) throws IOException { return raf.skipBytes(n); }
/** Skip n bytes within the stream. */ @Override public int skipBytes(int n) throws IOException { return raf.skipBytes(n); }
/** Skip n bytes within the stream. */ @Override public int skipBytes(int n) throws IOException { return raf.skipBytes(n); }
/** Skip n bytes within the stream. */ @Override public int skipBytes(int n) throws IOException { return raf.skipBytes(n); }
/** Skip n bytes within the stream. */ public long skipBytes(long n) throws IOException { return raf.skipBytes(n); }
/** * Parse an IM3 record at the current file pointer location * * @param is random access stream, pointing at the record's start * (the length-quadword of the record's tag name) * @return an IM3Record or subclass depending on the record's type * @throws IOException on file misparsing leading to overrun and other */ private static IM3Record parseRecord(IRandomAccess is) throws IOException { final String name = parseString(is); if (name == null) return null; final int recLength = is.readInt()-8; final int recType = is.readInt(); final long offset = is.getFilePointer(); is.skipBytes(recLength); switch(recType) { case REC_CONTAINER: return new ContainerRecord(name, recType, offset, recLength); case REC_STRING: return new StringIM3Record(name, recType, offset, recLength); case REC_INT: return new IntIM3Record(name, recType, offset, recLength); case REC_FLOAT: return new FloatIM3Record(name, recType, offset, recLength); case REC_BOOLEAN: return new BooleanIM3Record(name, recType, offset, recLength); } return new IM3Record(name, recType, offset, recLength); } /* (non-Javadoc)
/** * Parse an IM3 record at the current file pointer location * * @param is random access stream, pointing at the record's start * (the length-quadword of the record's tag name) * @return an IM3Record or subclass depending on the record's type * @throws IOException on file misparsing leading to overrun and other */ private static IM3Record parseRecord(IRandomAccess is) throws IOException { final String name = parseString(is); if (name == null) return null; final int recLength = is.readInt()-8; final int recType = is.readInt(); final long offset = is.getFilePointer(); is.skipBytes(recLength); switch(recType) { case REC_CONTAINER: return new ContainerRecord(name, recType, offset, recLength); case REC_STRING: return new StringIM3Record(name, recType, offset, recLength); case REC_INT: return new IntIM3Record(name, recType, offset, recLength); case REC_FLOAT: return new FloatIM3Record(name, recType, offset, recLength); case REC_BOOLEAN: return new BooleanIM3Record(name, recType, offset, recLength); } return new IM3Record(name, recType, offset, recLength); } /* (non-Javadoc)