You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

EOFRecord.java 2.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. /* ====================================================================
  2. Licensed to the Apache Software Foundation (ASF) under one or more
  3. contributor license agreements. See the NOTICE file distributed with
  4. this work for additional information regarding copyright ownership.
  5. The ASF licenses this file to You under the Apache License, Version 2.0
  6. (the "License"); you may not use this file except in compliance with
  7. the License. You may obtain a copy of the License at
  8. http://www.apache.org/licenses/LICENSE-2.0
  9. Unless required by applicable law or agreed to in writing, software
  10. distributed under the License is distributed on an "AS IS" BASIS,
  11. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. See the License for the specific language governing permissions and
  13. limitations under the License.
  14. ==================================================================== */
  15. package org.apache.poi.hssf.record;
  16. import java.util.Map;
  17. import java.util.function.Supplier;
  18. import org.apache.poi.util.LittleEndianOutput;
  19. /**
  20. * Marks the end of records belonging to a particular object in the HSSF File
  21. *
  22. * @version 2.0-pre
  23. */
  24. public final class EOFRecord extends StandardRecord {
  25. public static final short sid = 0x0A;
  26. public static final int ENCODED_SIZE = 4;
  27. public static final EOFRecord instance = new EOFRecord();
  28. private EOFRecord() {}
  29. /**
  30. * @param in unused (since this record has no data)
  31. */
  32. public EOFRecord(RecordInputStream in) {}
  33. public void serialize(LittleEndianOutput out) {
  34. }
  35. protected int getDataSize() {
  36. return ENCODED_SIZE - 4;
  37. }
  38. public short getSid()
  39. {
  40. return sid;
  41. }
  42. @Override
  43. public EOFRecord copy() {
  44. return instance;
  45. }
  46. @Override
  47. public HSSFRecordTypes getGenericRecordType() {
  48. return HSSFRecordTypes.EOF;
  49. }
  50. @Override
  51. public Map<String, Supplier<?>> getGenericProperties() {
  52. return null;
  53. }
  54. }