equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2003, 2014, 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 |
563 } |
563 } |
564 return new CharArrayReader(buf, (int)pos, (int)length); |
564 return new CharArrayReader(buf, (int)pos, (int)length); |
565 } |
565 } |
566 |
566 |
567 /** |
567 /** |
568 * This method frees the {@code SeriableClob} object and releases the |
568 * This method frees the {@code SerialClob} object and releases the |
569 * resources that it holds. |
569 * resources that it holds. |
570 * The object is invalid once the {@code free} method is called. |
570 * The object is invalid once the {@code free} method is called. |
571 * <p> |
571 * <p> |
572 * If {@code free} is called multiple times, the subsequent |
572 * If {@code free} is called multiple times, the subsequent |
573 * calls to {@code free} are treated as a no-op. |
573 * calls to {@code free} are treated as a no-op. |
668 ObjectOutputStream.PutField fields = s.putFields(); |
668 ObjectOutputStream.PutField fields = s.putFields(); |
669 fields.put("buf", buf); |
669 fields.put("buf", buf); |
670 fields.put("len", len); |
670 fields.put("len", len); |
671 fields.put("origLen", origLen); |
671 fields.put("origLen", origLen); |
672 // Note: this check to see if it is an instance of Serializable |
672 // Note: this check to see if it is an instance of Serializable |
673 // is for backwards compatibiity |
673 // is for backwards compatibility |
674 fields.put("clob", clob instanceof Serializable ? clob : null); |
674 fields.put("clob", clob instanceof Serializable ? clob : null); |
675 s.writeFields(); |
675 s.writeFields(); |
676 } |
676 } |
677 |
677 |
678 /** |
678 /** |