header.metaKeyList.add(key); } while ((l = vin.mapNext()) != 0);
header.metaKeyList.add(key); } while ((l = vin.mapNext()) != 0);
meta.put(key, bb); } while ((l = vin.mapNext()) != 0);
meta.put(key, bb); } while ((l = vin.mapNext()) != 0);
@Override public long mapNext() throws IOException { return wrappedDecoder.mapNext(); }
@Override public long mapNext() throws IOException { return wrappedDecoder.mapNext(); }
@Override public long mapNext() throws IOException { return wrappedDecoder.mapNext(); }
@Override public long decodeMapNext() throws IOException { return _decoder.mapNext(); }
numRecords = decoder.mapNext();
header.metaKeyList.add(key); } while ((l = vin.mapNext()) != 0);
header.metaKeyList.add(key); } while ((l = vin.mapNext()) != 0);
void initialize(InputStream in) throws IOException { this.vin = DecoderFactory.defaultFactory().createBinaryDecoder(in, vin); byte[] magic = new byte[DataFileConstants.MAGIC.length]; try { vin.readFixed(magic); // read magic } catch (IOException e) { throw new IOException("Not a data file."); } if (!Arrays.equals(DataFileConstants.MAGIC, magic)) throw new IOException("Not a data file."); long l = vin.readMapStart(); // read meta data if (l > 0) { do { for (long i = 0; i < l; i++) { String key = vin.readString(null).toString(); ByteBuffer value = vin.readBytes(null); byte[] bb = new byte[value.remaining()]; value.get(bb); meta.put(key, bb); } } while ((l = vin.mapNext()) != 0); } vin.readFixed(sync); // read sync this.codec = resolveCodec(); this.schema = Schema.parse(getMetaString(DataFileConstants.SCHEMA)); reader.setSchema(schema); }
numRecords = decoder.mapNext();
void initialize(InputStream in) throws IOException { this.vin = DecoderFactory.defaultFactory().createBinaryDecoder(in, vin); byte[] magic = new byte[DataFileConstants.MAGIC.length]; try { vin.readFixed(magic); // read magic } catch (IOException e) { throw new IOException("Not a data file."); } if (!Arrays.equals(DataFileConstants.MAGIC, magic)) throw new IOException("Not a data file."); long l = vin.readMapStart(); // read meta data if (l > 0) { do { for (long i = 0; i < l; i++) { String key = vin.readString(null).toString(); ByteBuffer value = vin.readBytes(null); byte[] bb = new byte[value.remaining()]; value.get(bb); meta.put(key, bb); } } while ((l = vin.mapNext()) != 0); } vin.readFixed(sync); // read sync this.codec = resolveCodec(); this.schema = Schema.parse(getMetaString(DataFileConstants.SCHEMA)); reader.setSchema(schema); }
meta.put(key, bb); } while ((l = vin.mapNext()) != 0);
meta.put(key, bb); } while ((l = vin.mapNext()) != 0);
nrItems = decoder.mapNext();
_count = _decoder.mapNext();