/** Sets the endianness of the stream. */ public void order(boolean little) { if (raf != null) { raf.setOrder(little ? ByteOrder.LITTLE_ENDIAN : ByteOrder.BIG_ENDIAN); } }
/** * Sets the endianness of the stream. * * @param little true if the stream ordering should be little-endian */ public void order(boolean little) { if (raf != null) { raf.setOrder(little ? ByteOrder.LITTLE_ENDIAN : ByteOrder.BIG_ENDIAN); } }
/** * Sets the endianness of the stream. * * @param little true if the byte order of the stream is little-endian */ public void order(boolean little) { outputFile.setOrder( little ? ByteOrder.LITTLE_ENDIAN : ByteOrder.BIG_ENDIAN); }
/** Sets the endianness of the stream. */ public void order(boolean little) { outputFile.setOrder( little ? ByteOrder.LITTLE_ENDIAN : ByteOrder.BIG_ENDIAN); }
/** * Constructs a random access stream around the given handle, * and with the associated file path. */ public RandomAccessInputStream(IRandomAccess handle, String file) throws IOException { if (LOGGER.isTraceEnabled()) { LOGGER.trace("RandomAccessInputStream {} OPEN", hashCode()); } raf = handle; raf.setOrder(ByteOrder.BIG_ENDIAN); this.file = file; seek(0); length = -1; }
/** * Constructs a random access stream around the given handle, * and with the associated file path. * * @param handle the {@link IRandomAccess} to be wrapped * @param file the name associated with the handle. Can be null. * @throws IOException if the handle is invalid */ public RandomAccessInputStream(IRandomAccess handle, String file) throws IOException { if (LOGGER.isTraceEnabled()) { LOGGER.trace("RandomAccessInputStream {} OPEN", hashCode()); } raf = handle; raf.setOrder(ByteOrder.BIG_ENDIAN); this.file = file; seek(0); length = -1; }
/** * Write a summary of each field in the IM3 file to the writer * @throws IOException */ public void writeSummary() throws IOException { IRandomAccess is = Location.getHandle(getCurrentFile(), false); try { is.setOrder(ByteOrder.LITTLE_ENDIAN); for (IM3Record rec: records) { rec.writeSummary(is, ""); } } finally { is.close(); } } /**
/** * Write a summary of each field in the IM3 file to the writer * @throws IOException */ public void writeSummary() throws IOException { IRandomAccess is = Location.getHandle(getCurrentFile(), false); try { is.setOrder(ByteOrder.LITTLE_ENDIAN); for (IM3Record rec: records) { rec.writeSummary(is, ""); } } finally { is.close(); } } /**
IRandomAccess is = Location.getHandle(getCurrentFile(), false); try { is.setOrder(ByteOrder.LITTLE_ENDIAN); final ContainerRecord dataSet = dataSets.get(getSeries()); for (IM3Record subRec:dataSet.parseChunks(is)){
IRandomAccess is = Location.getHandle(getCurrentFile(), false); try { is.setOrder(ByteOrder.LITTLE_ENDIAN); final ContainerRecord dataSet = dataSets.get(getSeries()); for (IM3Record subRec:dataSet.parseChunks(is)){
is.setOrder(ByteOrder.LITTLE_ENDIAN); final int cookie = is.readInt(); if (cookie != COOKIE) {
is.setOrder(ByteOrder.LITTLE_ENDIAN); final int cookie = is.readInt(); if (cookie != COOKIE) {