1 8 9 package com.sleepycat.persist.impl; 10 11 import java.util.IdentityHashMap ; 12 13 import com.sleepycat.persist.raw.RawObject; 14 15 21 class RawArrayInput extends RawAbstractInput { 22 23 private Object [] array; 24 private int index; 25 private Format componentFormat; 26 27 RawArrayInput(Catalog catalog, 28 boolean rawAccess, 29 IdentityHashMap converted, 30 RawObject raw, 31 Format componentFormat) { 32 super(catalog, rawAccess, converted); 33 array = raw.getElements(); 34 this.componentFormat = componentFormat; 35 } 36 37 @Override 38 public int readArrayLength() { 39 return array.length; 40 } 41 42 @Override 43 Object readNext() { 44 Object o = array[index++]; 45 return checkAndConvert(o, componentFormat); 46 } 47 } 48 | Popular Tags |