/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
* @bug 6262486
* @library ../../httptest/
* @build HttpCallback HttpServer ClosedChannelList HttpTransaction
* @summary COMPATIBILITY: jagex_com - Monkey Puzzle applet fails to load
*/
req.setResponseEntityBody ("Hello, This is the response body. Let's make it as long as possible since we need to test the cache mechanism.");
req.orderlyClose();
}
try {
} catch (IOException e) {
e.printStackTrace();
}
}
}
return buf;
}
/**
* Aborts the attempt to cache the response. If an IOException is
* encountered while reading the response or writing to the cache,
* the current cache store operation will be abandoned.
*/
public void abort() {
}
}
public MyResponseCache() {
}
return new MyCacheRequest(buf);
}
public CacheResponse get(URI uri, String rqstMethod, Map<String, List<String>> rqstHeaders) throws IOException {
return null;
}
public byte[] getBuffer() {
return buf.toByteArray();
}
}
try {
if (is.markSupported()) {
byte[] b = new byte[1024];
byte[] b2 = new byte[32];
int len;
int count;
len = 0;
count = 0;
do {
if (len > 0)
} while (len > 0);
do {
if (len > 0)
} while (len > 0);
throw new RuntimeException("cache got corrupted!");
}
} catch (Exception e) {
}
throw e;
}
}
}