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