w2phtml/source/java/writer2latex/office/EmbeddedBinaryObject.java
henrikjust 74d7599b11 Refactoring image conversion + some math bugfixes
git-svn-id: svn://svn.code.sf.net/p/writer2latex/code/trunk@168 f0f2a975-2e09-46c8-9428-3b39399b9f3c
2014-09-03 07:04:31 +00:00

66 lines
2 KiB
Java

/************************************************************************
*
* EmbeddedBinaryObject.java
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
* Copyright: 2002-2014 by Henrik Just
*
* All Rights Reserved.
*
* Version 1.4 (2012-03-28)
*
*/
package writer2latex.office;
import writer2latex.util.SimpleZipReader;
/**
* This class represents an embedded object with a binary representation in an ODF package document
*/
public class EmbeddedBinaryObject extends EmbeddedObject {
/** The object's binary representation. */
private byte[] blob = null;
/**
* Package private constructor for use when reading an object from a
* package ODF file
*
* @param sName The name of the object.
* @param sType The MIME-type of the object.
* @param doc The document containing the object.
* @param source A <code>SimpleZipReader</code> containing the object
*/
protected EmbeddedBinaryObject(String sName, String sType, OfficeDocument doc, SimpleZipReader source) {
super(sName,sType,doc);
blob = source.getEntry(sName);
}
/** Get the binary data for this object
*
* @return A <code>byte</code> array containing the object's data.
*/
public byte[] getBinaryData() {
return blob;
}
public void dispose() {
super.dispose();
blob = null;
}
}