/** * Copy the key into BytesWritable. The input BytesWritable will be * automatically resized to the actual key size. * * @param key * BytesWritable to hold the key. * @throws IOException */ public int getKey(BytesWritable key) throws IOException { key.setSize(getKeyLength()); getKey(key.getBytes()); return key.getLength(); }
/** * Copy the key into BytesWritable. The input BytesWritable will be * automatically resized to the actual key size. * * @param key * BytesWritable to hold the key. * @throws IOException */ public int getKey(BytesWritable key) throws IOException { key.setSize(getKeyLength()); getKey(key.getBytes()); return key.getLength(); }
/** * Copy the key into BytesWritable. The input BytesWritable will be * automatically resized to the actual key size. * * @param key * BytesWritable to hold the key. * @throws IOException */ public int getKey(BytesWritable key) throws IOException { key.setSize(getKeyLength()); getKey(key.getBytes()); return key.getLength(); }
/** * Copy the key and value in one shot into BytesWritables. This is * equivalent to getKey(key); getValue(value); * * @param key * BytesWritable to hold key. * @param value * BytesWritable to hold value * @throws IOException */ public void get(BytesWritable key, BytesWritable value) throws IOException { getKey(key); getValue(value); }
/** * Copy the key into BytesWritable. The input BytesWritable will be * automatically resized to the actual key size. * * @param key * BytesWritable to hold the key. * @throws IOException */ public int getKey(BytesWritable key) throws IOException { key.setSize(getKeyLength()); getKey(key.get()); return key.getSize(); }
/** * Copy the key into BytesWritable. The input BytesWritable will be * automatically resized to the actual key size. * * @param key * BytesWritable to hold the key. * @throws IOException */ public int getKey(BytesWritable key) throws IOException { key.setSize(getKeyLength()); getKey(key.getBytes()); return key.getLength(); }
/** * Copy the key into user supplied buffer. * * @param buf * The buffer supplied by user. The length of the buffer must * not be shorter than the key length. * @return The length of the key. * * @throws IOException */ public int getKey(byte[] buf) throws IOException { return getKey(buf, 0); }
/** * Copy the key into BytesWritable. The input BytesWritable will be * automatically resized to the actual key size. * * @param key * BytesWritable to hold the key. * @throws IOException */ public int getKey(BytesWritable key) throws IOException { key.setSize(getKeyLength()); getKey(key.getBytes()); return key.getLength(); }
@Override public boolean next() throws IOException { if (scanner.atEnd()) return false; Entry entry = scanner.entry(); keyLength = entry.getKeyLength(); checkKeyBuffer(keyLength); entry.getKey(keyBuffer); valueLength = entry.getValueLength(); checkValueBuffer(valueLength); entry.getValue(valueBuffer); scanner.advance(); return true; }
/** * Copy the key into user supplied buffer. * * @param buf * The buffer supplied by user. The length of the buffer must * not be shorter than the key length. * @return The length of the key. * * @throws IOException */ public int getKey(byte[] buf) throws IOException { return getKey(buf, 0); }
/** * Copy the key into user supplied buffer. * * @param buf * The buffer supplied by user. The length of the buffer must * not be shorter than the key length. * @return The length of the key. * * @throws IOException */ public int getKey(byte[] buf) throws IOException { return getKey(buf, 0); }
/** * Copy the key into user supplied buffer. * * @param buf * The buffer supplied by user. The length of the buffer must * not be shorter than the key length. * @return The length of the key. * * @throws IOException */ public int getKey(byte[] buf) throws IOException { return getKey(buf, 0); }
/** * Copy the key into user supplied buffer. * * @param buf * The buffer supplied by user. The length of the buffer must * not be shorter than the key length. * @return The length of the key. * * @throws IOException */ public int getKey(byte[] buf) throws IOException { return getKey(buf, 0); }
@Override public boolean next() throws IOException { if (scanner.atEnd()) return false; Entry entry = scanner.entry(); keyLength = entry.getKeyLength(); checkKeyBuffer(keyLength); entry.getKey(keyBuffer); valueLength = entry.getValueLength(); checkValueBuffer(valueLength); entry.getValue(valueBuffer); scanner.advance(); return true; }
public boolean next() throws IOException { if (scanner.atEnd()) return false; Entry entry = scanner.entry(); keyLength = entry.getKeyLength(); checkKeyBuffer(keyLength); entry.getKey(keyBuffer); valueLength = entry.getValueLength(); checkValueBuffer(valueLength); entry.getValue(valueBuffer); scanner.advance(); return true; }
public byte[] readKey(Scanner scanner) throws IOException { int keylen = scanner.entry().getKeyLength(); byte[] read = new byte[keylen]; scanner.entry().getKey(read); return read; }
public byte[] readKey(Scanner scanner) throws IOException { int keylen = scanner.entry().getKeyLength(); byte[] read = new byte[keylen]; scanner.entry().getKey(read); return read; }
public byte[] readKey(Scanner scanner) throws IOException { int keylen = scanner.entry().getKeyLength(); byte[] read = new byte[keylen]; scanner.entry().getKey(read); return read; }
/** * Copy the key and value in one shot into BytesWritables. This is * equivalent to getKey(key); getValue(value); * * @param key * BytesWritable to hold key. * @param value * BytesWritable to hold value * @throws IOException */ public void get(BytesWritable key, BytesWritable value) throws IOException { getKey(key); getValue(value); }
/** * Copy the key into user supplied buffer. * * @param buf * The buffer supplied by user. The length of the buffer must * not be shorter than the key length. * @return The length of the key. * * @throws IOException */ public int getKey(byte[] buf) throws IOException { return getKey(buf, 0); }