- Add the Codota plugin to your IDE and get smart completions
private void myMethod () {Dictionary d =
new Hashtable()
Bundle bundle;bundle.getHeaders()
new Properties()
- Smart code suggestions by Codota
}
@SuppressWarnings("unchecked") public D next() { try { ReadRecordStatus status = readRecord(hostBytes, lastProcessed); bytesRead += status.getBytesRead(); int prefixLen = hostBytesPrefixLen(); FromHostResult < GenericRecord > result = converter.convert( hostBytes, prefixLen, status.getRecordLen() == -1 ? hostBytes.length : status .getRecordLen() + prefixLen); bytesProcessed += lastProcessed = result.getBytesProcessed(); D specific = (D) SpecificData.get().deepCopy( result.getValue().getSchema(), result.getValue()); if (log.isDebugEnabled()) { log.debug("Avro record=" + specific.toString()); } return specific; } catch (IOException e) { throw new AvroRuntimeException(e); } }
public FromHostResult < SpecificRecord > convert(byte[] hostData, int start, int length) { FromHostResult < GenericRecord > result = converter.convert(hostData, start, length); if (result.getValue() == null) { return null; } this.specificRecord = (SpecificRecord) SpecificData.get().deepCopy( result.getValue().getSchema(), result.getValue()); return new FromHostResult < SpecificRecord >( result.getBytesProcessed(), specificRecord); }