Debian Codegraph @

lang/java/src/com/sleepycat/persist/impl/RawSingleInput.java

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