InputArchive.java 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /**
  2. * Licensed to the Apache Software Foundation (ASF) under one
  3. * or more contributor license agreements. See the NOTICE file
  4. * distributed with this work for additional information
  5. * regarding copyright ownership. The ASF licenses this file
  6. * to you under the Apache License, Version 2.0 (the
  7. * "License"); you may not use this file except in compliance
  8. * with the License. You may obtain a copy of the License at
  9. *
  10. * http://www.apache.org/licenses/LICENSE-2.0
  11. *
  12. * Unless required by applicable law or agreed to in writing, software
  13. * distributed under the License is distributed on an "AS IS" BASIS,
  14. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15. * See the License for the specific language governing permissions and
  16. * limitations under the License.
  17. */
  18. package com.yahoo.jute;
  19. import java.io.IOException;
  20. import java.io.ByteArrayOutputStream;
  21. /**
  22. * Interface that all the Deserializers have to implement.
  23. *
  24. * @author Milind Bhandarkar
  25. */
  26. public interface InputArchive {
  27. public byte readByte(String tag) throws IOException;
  28. public boolean readBool(String tag) throws IOException;
  29. public int readInt(String tag) throws IOException;
  30. public long readLong(String tag) throws IOException;
  31. public float readFloat(String tag) throws IOException;
  32. public double readDouble(String tag) throws IOException;
  33. public String readString(String tag) throws IOException;
  34. public byte[] readBuffer(String tag) throws IOException;
  35. public void readRecord(Record r, String tag) throws IOException;
  36. public void startRecord(String tag) throws IOException;
  37. public void endRecord(String tag) throws IOException;
  38. public Index startVector(String tag) throws IOException;
  39. public void endVector(String tag) throws IOException;
  40. public Index startMap(String tag) throws IOException;
  41. public void endMap(String tag) throws IOException;
  42. }