equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 1996, 2011, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1996, 2015, 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 |
161 public ObjectIdentifier getContentType() { |
161 public ObjectIdentifier getContentType() { |
162 return contentType; |
162 return contentType; |
163 } |
163 } |
164 |
164 |
165 public byte[] getData() throws IOException { |
165 public byte[] getData() throws IOException { |
166 if (contentType.equals((Object)DATA_OID) || |
166 if (contentType.equals(DATA_OID) || |
167 contentType.equals((Object)OLD_DATA_OID) || |
167 contentType.equals(OLD_DATA_OID) || |
168 contentType.equals((Object)TIMESTAMP_TOKEN_INFO_OID)) { |
168 contentType.equals(TIMESTAMP_TOKEN_INFO_OID)) { |
169 if (content == null) |
169 if (content == null) |
170 return null; |
170 return null; |
171 else |
171 else |
172 return content.getOctetString(); |
172 return content.getOctetString(); |
173 } |
173 } |