1 /* |
1 /* |
2 * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2005, 2013, 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 |
213 case XMLStreamReader.CHARACTERS: |
213 case XMLStreamReader.CHARACTERS: |
214 case XMLStreamReader.CDATA: { |
214 case XMLStreamReader.CDATA: { |
215 CharSequence c = reader.getPCDATA(); |
215 CharSequence c = reader.getPCDATA(); |
216 if (c instanceof Base64Data) { |
216 if (c instanceof Base64Data) { |
217 storeStructure(T_TEXT_AS_OBJECT); |
217 storeStructure(T_TEXT_AS_OBJECT); |
218 storeContentObject(((Base64Data)c).clone()); |
218 //Instead of clone the Base64Data, the original Base64Data instance is used here to preserve the DataHandler |
|
219 storeContentObject(c); |
219 } else { |
220 } else { |
220 storeContentCharacters(T_TEXT_AS_CHAR_ARRAY, |
221 storeContentCharacters(T_TEXT_AS_CHAR_ARRAY, |
221 reader.getTextCharacters(), reader.getTextStart(), |
222 reader.getTextCharacters(), reader.getTextStart(), |
222 reader.getTextLength()); |
223 reader.getTextLength()); |
223 } |
224 } |