1/*- 2 * See the file LICENSE for redistribution information. 3 * 4 * Copyright (c) 2002,2008 Oracle. All rights reserved. 5 * 6 * $Id: RawSingleInput.java,v 1.1 2008/02/07 17:12:27 mark Exp $ 7 */ 8 9package com.sleepycat.persist.impl; 10 11import java.util.IdentityHashMap; 12 13/** 14 * Extends RawAbstractInput to convert array (ObjectArrayFormat and 15 * PrimitiveArrayteKeyFormat) RawObject instances. 16 * 17 * @author Mark Hayes 18 */ 19class RawSingleInput extends RawAbstractInput { 20 21 private Object singleValue; 22 private Format declaredFormat; 23 24 RawSingleInput(Catalog catalog, 25 boolean rawAccess, 26 IdentityHashMap converted, 27 Object singleValue, 28 Format declaredFormat) { 29 super(catalog, rawAccess, converted); 30 this.singleValue = singleValue; 31 this.declaredFormat = declaredFormat; 32 } 33 34 @Override 35 Object readNext() { 36 return checkAndConvert(singleValue, declaredFormat); 37 } 38} 39