KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sleepycat > persist > impl > RawSingleInput


1 /*-
2  * See the file LICENSE for redistribution information.
3  *
4  * Copyright (c) 2002,2006 Oracle. All rights reserved.
5  *
6  * $Id: RawSingleInput.java,v 1.4 2006/10/30 21:14:32 bostic Exp $
7  */

8
9 package com.sleepycat.persist.impl;
10
11 import java.util.IdentityHashMap JavaDoc;
12
13 /**
14  * Extends RawAbstractInput to convert array (ObjectArrayFormat and
15  * PrimitiveArrayteKeyFormat) RawObject instances.
16  *
17  * @author Mark Hayes
18  */

19 class RawSingleInput extends RawAbstractInput {
20
21     private Object JavaDoc singleValue;
22     private Format declaredFormat;
23
24     RawSingleInput(Catalog catalog,
25                    boolean rawAccess,
26                    IdentityHashMap JavaDoc converted,
27                    Object JavaDoc singleValue,
28                    Format declaredFormat) {
29         super(catalog, rawAccess, converted);
30         this.singleValue = singleValue;
31         this.declaredFormat = declaredFormat;
32     }
33
34     @Override JavaDoc
35     Object JavaDoc readNext() {
36         return checkAndConvert(singleValue, declaredFormat);
37     }
38 }
39
Popular Tags