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.

POIFSReaderEvent.java 2.4KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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.poifs.eventfilesystem;
  16. import org.apache.poi.hpsf.ClassID;
  17. import org.apache.poi.poifs.filesystem.DocumentInputStream;
  18. import org.apache.poi.poifs.filesystem.POIFSDocumentPath;
  19. /**
  20. * Class POIFSReaderEvent
  21. */
  22. public class POIFSReaderEvent {
  23. private final DocumentInputStream stream;
  24. private final POIFSDocumentPath path;
  25. private final String documentName;
  26. private final ClassID storageClassId;
  27. /**
  28. * package scoped constructor
  29. *
  30. * @param stream the DocumentInputStream, freshly opened
  31. * @param path the path of the document
  32. * @param documentName the name of the document
  33. */
  34. POIFSReaderEvent(final DocumentInputStream stream,
  35. final POIFSDocumentPath path, final String documentName, final ClassID storageClassId) {
  36. this.stream = stream;
  37. this.path = path;
  38. this.documentName = documentName;
  39. this.storageClassId = storageClassId;
  40. }
  41. /**
  42. * @return the DocumentInputStream, freshly opened
  43. */
  44. public DocumentInputStream getStream() {
  45. return stream;
  46. }
  47. /**
  48. * @return the document's path
  49. */
  50. public POIFSDocumentPath getPath() {
  51. return path;
  52. }
  53. /**
  54. * @return the document's name
  55. */
  56. public String getName() {
  57. return documentName;
  58. }
  59. /**
  60. * @return the storage class id of the path
  61. */
  62. public ClassID getStorageClassId() {
  63. return storageClassId;
  64. }
  65. }