4567N/A * Copyright (c) 2003, 2009, Oracle and/or its affiliates. All rights reserved. 4567N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4567N/A * This code is free software; you can redistribute it and/or modify it 4567N/A * under the terms of the GNU General Public License version 2 only, as 4567N/A * published by the Free Software Foundation. Oracle designates this 4567N/A * particular file as subject to the "Classpath" exception as provided 4567N/A * by Oracle in the LICENSE file that accompanied this code. 4567N/A * This code is distributed in the hope that it will be useful, but WITHOUT 4567N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 4567N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 4567N/A * version 2 for more details (a copy is included in the LICENSE file that 4567N/A * You should have received a copy of the GNU General Public License version 4567N/A * 2 along with this work; if not, write to the Free Software Foundation, 4567N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 4567N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 4567N/A * or visit www.oracle.com if you need additional information or have any 4567N/A * A timestamper that communicates with a Timestamping Authority (TSA) 4567N/A * It supports the Time-Stamp Protocol defined in: 4567N/A // The MIME type for a timestamp query 4567N/A // The MIME type for a timestamp reply 4567N/A * HTTP URL identifying the location of the TSA 4567N/A * Creates a timestamper that connects to the specified TSA. 4567N/A * @param tsa The location of the TSA. It must be an HTTP URL. 4567N/A * Connects to the TSA and requests a timestamp. 4567N/A * @param tsQuery The timestamp query. 4567N/A * @return The result of the timestamp query. 4567N/A * @throws IOException The exception is thrown if a problem occurs while 4567N/A * communicating with the TSA. 4567N/A // Avoids the "hang" when a proxy is required but none has been set. * Checks that the MIME content type is a timestamp reply. * @param contentType The MIME content type to be checked. * @throws IOException The exception is thrown if a mismatch occurs.