equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Oracle designates this |
7 * published by the Free Software Foundation. Oracle designates this |
23 * questions. |
23 * questions. |
24 */ |
24 */ |
25 package javax.sql.rowset.serial; |
25 package javax.sql.rowset.serial; |
26 |
26 |
27 import java.sql.*; |
27 import java.sql.*; |
|
28 import java.util.Arrays; |
28 import java.util.Map; |
29 import java.util.Map; |
29 |
30 |
30 /** |
31 /** |
31 * An input stream used for custom mapping user-defined types (UDTs). |
32 * An input stream used for custom mapping user-defined types (UDTs). |
32 * An <code>SQLInputImpl</code> object is an input stream that contains a |
33 * An <code>SQLInputImpl</code> object is an input stream that contains a |
117 if ((attributes == null) || (map == null)) { |
118 if ((attributes == null) || (map == null)) { |
118 throw new SQLException("Cannot instantiate a SQLInputImpl " + |
119 throw new SQLException("Cannot instantiate a SQLInputImpl " + |
119 "object with null parameters"); |
120 "object with null parameters"); |
120 } |
121 } |
121 // assign our local reference to the attribute stream |
122 // assign our local reference to the attribute stream |
122 attrib = attributes; |
123 attrib = Arrays.copyOf(attributes, attributes.length); |
123 // init the index point before the head of the stream |
124 // init the index point before the head of the stream |
124 idx = -1; |
125 idx = -1; |
125 // set the map |
126 // set the map |
126 this.map = map; |
127 this.map = map; |
127 } |
128 } |