ReadBuffer.java revision 2224:2a8815d86b93
1136644Sache/*
2136644Sache * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
3136644Sache * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4136644Sache *
5136644Sache * This code is free software; you can redistribute it and/or modify it
6136644Sache * under the terms of the GNU General Public License version 2 only, as
7136644Sache * published by the Free Software Foundation.  Oracle designates this
8136644Sache * particular file as subject to the "Classpath" exception as provided
9136644Sache * by Oracle in the LICENSE file that accompanied this code.
10136644Sache *
11136644Sache * This code is distributed in the hope that it will be useful, but WITHOUT
12136644Sache * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13136644Sache * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
14136644Sache * version 2 for more details (a copy is included in the LICENSE file that
15136644Sache * accompanied this code).
16136644Sache *
17136644Sache * You should have received a copy of the GNU General Public License version
18136644Sache * 2 along with this work; if not, write to the Free Software Foundation,
19136644Sache * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20136644Sache *
21136644Sache * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22136644Sache * or visit www.oracle.com if you need additional information or have any
23136644Sache * questions.
24136644Sache */
25136644Sache
26136644Sache
27136644Sache/*
28136644Sache * The Original Code is HAT. The Initial Developer of the
29136644Sache * Original Code is Bill Foote, with contributions from others
30136644Sache * at JavaSoft/Sun.
31136644Sache */
32136644Sache
33136644Sachepackage jdk.test.lib.hprof.parser;
34136644Sache
35136644Sacheimport java.io.IOException;
36136644Sache
37136644Sache/**
38136644Sache * Positionable read only buffer
39136644Sache *
40136644Sache * @author A. Sundararajan
41136644Sache */
42136644Sachepublic interface ReadBuffer extends AutoCloseable {
43136644Sache    // read methods - only byte array and int primitive types.
44136644Sache    // read position has to be specified always.
45136644Sache    public void  get(long pos, byte[] buf) throws IOException;
46136644Sache    public char  getChar(long pos) throws IOException;
47136644Sache    public byte  getByte(long pos) throws IOException;
48136644Sache    public short getShort(long pos) throws IOException;
49136644Sache    public int   getInt(long pos) throws IOException;
50136644Sache    public long  getLong(long pos) throws IOException;
51136644Sache}
52136644Sache