/** * Seeks to the given offset within the stream. * * @param pos the new byte offset * @throws IOException if the seek fails */ public void seek(long pos) throws IOException { raf.seek(pos); }
/** * Seeks to the given offset within the stream. * * @param pos the offset to which to seek * @throws IOException if the seek is not successful */ public void seek(long pos) throws IOException { raf.seek(pos); }
/** Seeks to the given offset within the stream. */ public void seek(long pos) throws IOException { raf.seek(pos); }
/** * Seeks to the given offset within the stream. * * @param pos the new offset within the stream * @throws IOException is the seek is not successful */ public void seek(long pos) throws IOException { outputFile.seek(pos); }
/** Seeks to the given offset within the stream. */ public void seek(long pos) throws IOException { raf.seek(pos); }
/** Seeks to the given offset within the stream. */ public void seek(long pos) throws IOException { outputFile.seek(pos); }
@Override public void reset() throws IOException { raf.seek(0); }
@Override public void reset() throws IOException { raf.seek(0); }
/** Advances the current offset by the given number of bytes. */ public void skipBytes(int skip) throws IOException { outputFile.seek(outputFile.getFilePointer() + skip); }
/** * Get the # of boolean values in this record * * @return number of boolean values contained in the record * @throws IOException */ public int getNumEntries(IRandomAccess is) throws IOException { long oldPos = is.getFilePointer(); try { is.seek(offset+4); return is.readInt(); } finally { is.seek(oldPos); } }
/** * Return the string value for this record * * @param is an open handle on the .IM3 file * @return the string value stored in the record * @throws IOException */ public String getValue(IRandomAccess is) throws IOException { final long oldPos = is.getFilePointer(); try { is.seek(offset+4); return parseString(is); } finally { is.seek(oldPos); } }
/** * Return the string value for this record * * @param is an open handle on the .IM3 file * @return the string value stored in the record * @throws IOException */ public String getValue(IRandomAccess is) throws IOException { final long oldPos = is.getFilePointer(); try { is.seek(offset+4); return parseString(is); } finally { is.seek(oldPos); } }
/** * Get the # of boolean values in this record * * @return number of boolean values contained in the record * @throws IOException */ public int getNumEntries(IRandomAccess is) throws IOException { long oldPos = is.getFilePointer(); try { is.seek(offset+4); return is.readInt(); } finally { is.seek(oldPos); } }
public void writeSummary(IRandomAccess is, String indentation) throws IOException { is.seek(offset); LOGGER.info(indentation + toString()); final int length = getNumEntries(is); for (int i=0; (i < length) && (i < 256); i+=16) { StringBuilder msg = new StringBuilder(indentation + String.format("%02x:", i)); for (int j=i; (j<i+16) && (j<length); j++) { msg.append(String.format(" %4.4f", getEntry(is, j))); } LOGGER.info(msg.toString()); } } }
public void writeSummary(IRandomAccess is, String indentation) throws IOException { is.seek(offset); LOGGER.info(indentation + toString()); final int length = getNumEntries(is); for (int i=0; (i < length) && (i < 256); i+=16) { StringBuilder msg = new StringBuilder(indentation + String.format("%02x:", i)); for (int j=i; (j<i+16) && (j<length); j++) { msg.append(String.format(" %7d", getEntry(is, j))); } LOGGER.info(msg.toString()); } } }
public void writeSummary(IRandomAccess is, String indentation) throws IOException { is.seek(offset); LOGGER.info(indentation + toString()); final int length = getNumEntries(is); for (int i=0; (i < length) && (i < 256); i+=16) { StringBuilder msg = new StringBuilder(indentation + String.format("%02x:", i)); for (int j=i; (j<i+16) && (j<length); j++) { msg.append(String.format(" %7d", getEntry(is, j))); } LOGGER.info(msg.toString()); } } }
public void writeSummary(IRandomAccess is, String indentation) throws IOException { is.seek(offset); LOGGER.info(indentation + toString()); final int length = getNumEntries(is); for (int i=0; (i < length) && (i < 256); i+=16) { StringBuilder msg = new StringBuilder(indentation + String.format("%02x:", i)); for (int j=i; (j<i+16) && (j<length); j++) { msg.append(String.format(" %4.4f", getEntry(is, j))); } LOGGER.info(msg.toString()); } } }
/** * Get the # of floating-point values in this record * * @return number of integer values contained in the record * @throws IOException */ public int getNumEntries(IRandomAccess is) throws IOException { long oldPos = is.getFilePointer(); try { is.seek(offset); if (is.readInt() == 0) return 1; return is.readInt(); } finally { is.seek(oldPos); } }
public void writeSummary(IRandomAccess is, String indentation) throws IOException { is.seek(offset); LOGGER.info(indentation + toString()); for (IM3Record rec:parseChunks(is)) { rec.writeSummary(is, indentation + " "); } } }
public void writeSummary(IRandomAccess is, String indentation) throws IOException { is.seek(offset); LOGGER.info(indentation + toString()); for (IM3Record rec:parseChunks(is)) { rec.writeSummary(is, indentation + " "); } } }