2002-05-11 10:47:24 -04:00
|
|
|
/*
|
|
|
|
* ====================================================================
|
|
|
|
* The Apache Software License, Version 1.1
|
2002-02-13 23:00:59 -05:00
|
|
|
*
|
2002-05-11 10:47:24 -04:00
|
|
|
* Copyright (c) 2000 The Apache Software Foundation. All rights
|
|
|
|
* reserved.
|
2002-02-13 23:00:59 -05:00
|
|
|
*
|
2002-05-11 10:47:24 -04:00
|
|
|
* Redistribution and use in source and binary forms, with or without
|
|
|
|
* modification, are permitted provided that the following conditions
|
|
|
|
* are met:
|
2002-02-13 23:00:59 -05:00
|
|
|
*
|
2002-05-11 10:47:24 -04:00
|
|
|
* 1. Redistributions of source code must retain the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer.
|
2002-02-13 23:00:59 -05:00
|
|
|
*
|
2002-05-11 10:47:24 -04:00
|
|
|
* 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer in
|
|
|
|
* the documentation and/or other materials provided with the
|
|
|
|
* distribution.
|
2002-02-13 23:00:59 -05:00
|
|
|
*
|
2002-05-11 10:47:24 -04:00
|
|
|
* 3. The end-user documentation included with the redistribution,
|
|
|
|
* if any, must include the following acknowledgment:
|
|
|
|
* "This product includes software developed by the
|
|
|
|
* Apache Software Foundation (http://www.apache.org/)."
|
|
|
|
* Alternately, this acknowledgment may appear in the software itself,
|
|
|
|
* if and wherever such third-party acknowledgments normally appear.
|
2002-02-13 23:00:59 -05:00
|
|
|
*
|
2002-05-11 10:47:24 -04:00
|
|
|
* 4. The names "Apache" and "Apache Software Foundation" must
|
|
|
|
* not be used to endorse or promote products derived from this
|
|
|
|
* software without prior written permission. For written
|
|
|
|
* permission, please contact apache@apache.org.
|
2002-02-13 23:00:59 -05:00
|
|
|
*
|
2002-05-11 10:47:24 -04:00
|
|
|
* 5. Products derived from this software may not be called "Apache",
|
|
|
|
* nor may "Apache" appear in their name, without prior written
|
|
|
|
* permission of the Apache Software Foundation.
|
2002-02-13 23:00:59 -05:00
|
|
|
*
|
2002-05-11 10:47:24 -04:00
|
|
|
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
|
|
|
|
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
|
|
|
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
|
|
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
|
|
|
|
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
|
|
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
|
|
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
|
|
|
|
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
|
|
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
|
|
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
|
|
|
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
|
|
* SUCH DAMAGE.
|
|
|
|
* ====================================================================
|
2002-02-13 23:00:59 -05:00
|
|
|
*
|
2002-05-11 10:47:24 -04:00
|
|
|
* This software consists of voluntary contributions made by many
|
|
|
|
* individuals on behalf of the Apache Software Foundation. For more
|
|
|
|
* information on the Apache Software Foundation, please see
|
|
|
|
* <http://www.apache.org/>.
|
2002-02-13 23:00:59 -05:00
|
|
|
*/
|
|
|
|
package org.apache.poi.hpsf;
|
|
|
|
|
|
|
|
import java.util.*;
|
2002-05-11 10:47:24 -04:00
|
|
|
import org.apache.poi.util.LittleEndian;
|
2002-02-13 23:00:59 -05:00
|
|
|
import org.apache.poi.hpsf.wellknown.*;
|
|
|
|
|
|
|
|
/**
|
2002-07-17 12:23:22 -04:00
|
|
|
* <p>Represents a section in a {@link PropertySet}.</p>
|
2002-02-13 23:00:59 -05:00
|
|
|
*
|
2002-07-17 12:23:22 -04:00
|
|
|
* @author Rainer Klute (klute@rainer-klute.de)
|
|
|
|
* @author Drew Varner (Drew.Varner allUpIn sc.edu)
|
|
|
|
* @version $Id$
|
|
|
|
* @since 2002-02-09
|
2002-02-13 23:00:59 -05:00
|
|
|
*/
|
2002-07-17 12:23:22 -04:00
|
|
|
public class Section
|
|
|
|
{
|
2002-02-13 23:00:59 -05:00
|
|
|
|
|
|
|
/**
|
2002-07-17 12:23:22 -04:00
|
|
|
* <p>Maps property IDs to section-private PID strings. These
|
|
|
|
* strings can be found in the property with ID 0.</p>
|
2002-02-13 23:00:59 -05:00
|
|
|
*/
|
|
|
|
protected Map dictionary;
|
|
|
|
|
|
|
|
private ClassID formatID;
|
|
|
|
|
2002-05-11 10:47:24 -04:00
|
|
|
|
2002-02-13 23:00:59 -05:00
|
|
|
/**
|
2002-07-17 12:23:22 -04:00
|
|
|
* <p>Returns the format ID. The format ID is the "type" of the
|
2003-01-29 13:01:18 -05:00
|
|
|
* section. For example, if the format ID of the first {@link
|
|
|
|
* Section} contains the bytes specified by
|
|
|
|
* <code>org.apache.poi.hpsf.wellknown.SectionIDMap.SUMMARY_INFORMATION_ID</code>
|
|
|
|
* the section (and thus the property set) is a
|
|
|
|
* SummaryInformation.</p>
|
2002-05-11 10:47:24 -04:00
|
|
|
*
|
2002-07-17 12:23:22 -04:00
|
|
|
* @return The format ID
|
2002-02-13 23:00:59 -05:00
|
|
|
*/
|
2002-07-17 12:23:22 -04:00
|
|
|
public ClassID getFormatID()
|
|
|
|
{
|
2002-02-13 23:00:59 -05:00
|
|
|
return formatID;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2002-05-11 10:47:24 -04:00
|
|
|
private long offset;
|
|
|
|
|
2002-02-13 23:00:59 -05:00
|
|
|
|
|
|
|
/**
|
2002-07-17 12:23:22 -04:00
|
|
|
* <p>Returns the offset of the section in the stream.</p>
|
2002-05-11 10:47:24 -04:00
|
|
|
*
|
2002-07-17 12:23:22 -04:00
|
|
|
* @return The offset of the section in the stream.
|
2002-02-13 23:00:59 -05:00
|
|
|
*/
|
2002-07-17 12:23:22 -04:00
|
|
|
public long getOffset()
|
|
|
|
{
|
2002-02-13 23:00:59 -05:00
|
|
|
return offset;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private int size;
|
|
|
|
|
2002-05-11 10:47:24 -04:00
|
|
|
|
2002-02-13 23:00:59 -05:00
|
|
|
/**
|
2002-07-17 12:23:22 -04:00
|
|
|
* <p>Returns the section's size in bytes.</p>
|
2002-05-11 10:47:24 -04:00
|
|
|
*
|
2002-07-17 12:23:22 -04:00
|
|
|
* @return The section's size in bytes.
|
2002-02-13 23:00:59 -05:00
|
|
|
*/
|
2002-07-17 12:23:22 -04:00
|
|
|
public int getSize()
|
|
|
|
{
|
2002-02-13 23:00:59 -05:00
|
|
|
return size;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private int propertyCount;
|
|
|
|
|
2002-05-11 10:47:24 -04:00
|
|
|
|
2002-02-13 23:00:59 -05:00
|
|
|
/**
|
2002-07-17 12:23:22 -04:00
|
|
|
* <p>Returns the number of properties in this section.</p>
|
2002-05-11 10:47:24 -04:00
|
|
|
*
|
2002-07-17 12:23:22 -04:00
|
|
|
* @return The number of properties in this section.
|
2002-02-13 23:00:59 -05:00
|
|
|
*/
|
2002-07-17 12:23:22 -04:00
|
|
|
public int getPropertyCount()
|
|
|
|
{
|
2002-02-13 23:00:59 -05:00
|
|
|
return propertyCount;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private Property[] properties;
|
|
|
|
|
2002-05-11 10:47:24 -04:00
|
|
|
|
2002-02-13 23:00:59 -05:00
|
|
|
/**
|
2002-07-17 12:23:22 -04:00
|
|
|
* <p>Returns this section's properties.</p>
|
2002-05-11 10:47:24 -04:00
|
|
|
*
|
2002-07-17 12:23:22 -04:00
|
|
|
* @return This section's properties.
|
2002-02-13 23:00:59 -05:00
|
|
|
*/
|
2002-07-17 12:23:22 -04:00
|
|
|
public Property[] getProperties()
|
|
|
|
{
|
2002-02-13 23:00:59 -05:00
|
|
|
return properties;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
2002-07-17 12:23:22 -04:00
|
|
|
* <p>Creates a {@link Section} instance from a byte array.</p>
|
2002-02-13 23:00:59 -05:00
|
|
|
*
|
2002-07-17 12:23:22 -04:00
|
|
|
* @param src Contains the complete property set stream.
|
|
|
|
* @param offset The position in the stream that points to the
|
|
|
|
* section's format ID.
|
2002-02-13 23:00:59 -05:00
|
|
|
*/
|
2002-07-17 12:23:22 -04:00
|
|
|
public Section(final byte[] src, int offset)
|
|
|
|
{
|
2002-05-11 10:47:24 -04:00
|
|
|
/*
|
2002-12-10 01:15:20 -05:00
|
|
|
* Read the format ID.
|
2002-05-11 10:47:24 -04:00
|
|
|
*/
|
2002-02-13 23:00:59 -05:00
|
|
|
formatID = new ClassID(src, offset);
|
|
|
|
offset += ClassID.LENGTH;
|
|
|
|
|
2002-05-11 10:47:24 -04:00
|
|
|
/*
|
2002-12-10 01:15:20 -05:00
|
|
|
* Read the offset from the stream's start and positions to
|
|
|
|
* the section header.
|
2002-05-11 10:47:24 -04:00
|
|
|
*/
|
|
|
|
this.offset = LittleEndian.getUInt(src, offset);
|
|
|
|
offset = (int)this.offset;
|
|
|
|
|
|
|
|
/*
|
2002-12-10 01:15:20 -05:00
|
|
|
* Read the section length.
|
2002-05-11 10:47:24 -04:00
|
|
|
*/
|
|
|
|
size = (int)LittleEndian.getUInt(src, offset);
|
|
|
|
offset += LittleEndian.INT_SIZE;
|
|
|
|
|
|
|
|
/*
|
2002-12-10 01:15:20 -05:00
|
|
|
* Read the number of properties.
|
2002-05-11 10:47:24 -04:00
|
|
|
*/
|
|
|
|
propertyCount = (int)LittleEndian.getUInt(src, offset);
|
|
|
|
offset += LittleEndian.INT_SIZE;
|
|
|
|
|
|
|
|
/*
|
2002-12-10 01:15:20 -05:00
|
|
|
* Read the properties. The offset is positioned at the first
|
|
|
|
* entry of the property list. The problem is that we have to
|
|
|
|
* read the property with ID 1 before we read other
|
|
|
|
* properties, at least before other properties containing
|
|
|
|
* strings. The reason is that property 1 specifies the
|
|
|
|
* codepage. If it is 1200, all strings are in Unicode. In
|
|
|
|
* other words: Before we can read any strings we have to know
|
|
|
|
* whether they are in Unicode or not. Unfortunately property
|
|
|
|
* 1 is not guaranteed to be the first in a section.
|
|
|
|
*
|
|
|
|
* The algorithm below reads the properties in two passes: The
|
|
|
|
* first one looks for property ID 1 and extracts the codepage
|
|
|
|
* number. The seconds pass reads the other properties.
|
2002-05-11 10:47:24 -04:00
|
|
|
*/
|
2002-02-13 23:00:59 -05:00
|
|
|
properties = new Property[propertyCount];
|
2002-12-10 01:15:20 -05:00
|
|
|
Property propertyOne;
|
|
|
|
|
|
|
|
/* Pass 1: Look for the codepage. */
|
|
|
|
int codepage = -1;
|
|
|
|
int pass1Offset = offset;
|
|
|
|
for (int i = 0; i < properties.length; i++)
|
|
|
|
{
|
|
|
|
/* Read the property ID. */
|
|
|
|
final int id = (int) LittleEndian.getUInt(src, pass1Offset);
|
|
|
|
pass1Offset += LittleEndian.INT_SIZE;
|
|
|
|
|
|
|
|
/* Offset from the section's start. */
|
|
|
|
final int sOffset = (int) LittleEndian.getUInt(src, pass1Offset);
|
|
|
|
pass1Offset += LittleEndian.INT_SIZE;
|
|
|
|
|
|
|
|
/* Calculate the length of the property. */
|
|
|
|
int length;
|
|
|
|
if (i == properties.length - 1)
|
|
|
|
length = (int) (src.length - this.offset - sOffset);
|
|
|
|
else
|
|
|
|
length = (int)
|
|
|
|
LittleEndian.getUInt(src, pass1Offset +
|
|
|
|
LittleEndian.INT_SIZE) - sOffset;
|
|
|
|
|
|
|
|
if (id == PropertyIDMap.PID_CODEPAGE)
|
|
|
|
{
|
|
|
|
/* Read the codepage if the property ID is 1. */
|
|
|
|
|
|
|
|
/* Read the property's value type. It must be
|
|
|
|
* VT_I2. */
|
|
|
|
int o = (int) (this.offset + sOffset);
|
|
|
|
final long type = LittleEndian.getUInt(src, o);
|
|
|
|
o += LittleEndian.INT_SIZE;
|
|
|
|
|
|
|
|
if (type != Variant.VT_I2)
|
|
|
|
throw new HPSFRuntimeException
|
|
|
|
("Value type of property ID 1 is not VT_I2 but " +
|
|
|
|
type + ".");
|
|
|
|
|
|
|
|
/* Read the codepage number. */
|
|
|
|
codepage = LittleEndian.getUShort(src, o);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Pass 2: Read all properties, including 1. */
|
|
|
|
for (int i = 0; i < properties.length; i++)
|
|
|
|
{
|
|
|
|
/* Read the property ID. */
|
|
|
|
final int id = (int) LittleEndian.getUInt(src, offset);
|
2002-05-11 10:47:24 -04:00
|
|
|
offset += LittleEndian.INT_SIZE;
|
|
|
|
|
2002-12-10 01:15:20 -05:00
|
|
|
/* Offset from the section. */
|
|
|
|
final int sOffset = (int) LittleEndian.getUInt(src, offset);
|
2002-05-11 10:47:24 -04:00
|
|
|
offset += LittleEndian.INT_SIZE;
|
|
|
|
|
2002-12-10 01:15:20 -05:00
|
|
|
/* Calculate the length of the property. */
|
2002-02-13 23:00:59 -05:00
|
|
|
int length;
|
2002-12-10 01:15:20 -05:00
|
|
|
if (i == properties.length - 1)
|
|
|
|
length = (int) (src.length - this.offset - sOffset);
|
|
|
|
else
|
2002-05-11 10:47:24 -04:00
|
|
|
length = (int)
|
2002-07-17 12:23:22 -04:00
|
|
|
LittleEndian.getUInt(src, offset + LittleEndian.INT_SIZE) -
|
|
|
|
sOffset;
|
2002-05-11 10:47:24 -04:00
|
|
|
|
2002-12-10 01:15:20 -05:00
|
|
|
/* Create it. */
|
|
|
|
properties[i] = new Property(id, src, this.offset + sOffset,
|
|
|
|
length, codepage);
|
2002-02-13 23:00:59 -05:00
|
|
|
}
|
|
|
|
|
2002-05-11 10:47:24 -04:00
|
|
|
/*
|
2002-12-10 01:15:20 -05:00
|
|
|
* Extract the dictionary (if available).
|
2002-05-11 10:47:24 -04:00
|
|
|
*/
|
2002-02-13 23:00:59 -05:00
|
|
|
dictionary = (Map) getProperty(0);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
2002-07-17 12:23:22 -04:00
|
|
|
* <p>Returns the value of the property with the specified ID. If
|
|
|
|
* the property is not available, <code>null</code> is returned
|
|
|
|
* and a subsequent call to {@link #wasNull} will return
|
|
|
|
* <code>true</code>.</p>
|
2002-05-11 10:47:24 -04:00
|
|
|
*
|
2002-07-17 12:23:22 -04:00
|
|
|
* @param id The property's ID
|
2002-05-11 10:47:24 -04:00
|
|
|
*
|
2002-07-17 12:23:22 -04:00
|
|
|
* @return The property's value
|
2002-02-13 23:00:59 -05:00
|
|
|
*/
|
2002-12-10 01:15:20 -05:00
|
|
|
public Object getProperty(final int id)
|
2002-07-17 12:23:22 -04:00
|
|
|
{
|
2002-02-13 23:00:59 -05:00
|
|
|
wasNull = false;
|
2002-07-17 12:23:22 -04:00
|
|
|
for (int i = 0; i < properties.length; i++)
|
|
|
|
if (id == properties[i].getID())
|
2002-02-13 23:00:59 -05:00
|
|
|
return properties[i].getValue();
|
|
|
|
wasNull = true;
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
2002-07-17 12:23:22 -04:00
|
|
|
* <p>Returns the value of the numeric property with the specified
|
|
|
|
* ID. If the property is not available, 0 is returned. A
|
|
|
|
* subsequent call to {@link #wasNull} will return
|
|
|
|
* <code>true</code> to let the caller distinguish that case from
|
|
|
|
* a real property value of 0.</p>
|
2002-05-11 10:47:24 -04:00
|
|
|
*
|
2002-07-17 12:23:22 -04:00
|
|
|
* @param id The property's ID
|
2002-05-11 10:47:24 -04:00
|
|
|
*
|
2002-07-17 12:23:22 -04:00
|
|
|
* @return The property's value
|
2002-02-13 23:00:59 -05:00
|
|
|
*/
|
2002-07-17 12:23:22 -04:00
|
|
|
protected int getPropertyIntValue(final int id)
|
|
|
|
{
|
|
|
|
/* FIXME: Find out why the following is a Long instead of an
|
|
|
|
* Integer! */
|
|
|
|
final Long i = (Long) getProperty(id);
|
|
|
|
if (i != null)
|
2002-02-13 23:00:59 -05:00
|
|
|
return i.intValue();
|
2002-07-17 12:23:22 -04:00
|
|
|
else
|
2002-02-13 23:00:59 -05:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2002-05-03 03:29:09 -04:00
|
|
|
/**
|
2002-07-17 12:23:22 -04:00
|
|
|
* <p>Returns the value of the boolean property with the specified
|
|
|
|
* ID. If the property is not available, <code>false</code> is
|
|
|
|
* returned. A subsequent call to {@link #wasNull} will return
|
|
|
|
* <code>true</code> to let the caller distinguish that case from
|
|
|
|
* a real property value of <code>false</code>.</p>
|
2002-05-11 10:47:24 -04:00
|
|
|
*
|
2002-07-17 12:23:22 -04:00
|
|
|
* @param id The property's ID
|
2002-05-11 10:47:24 -04:00
|
|
|
*
|
2002-07-17 12:23:22 -04:00
|
|
|
* @return The property's value
|
2002-05-03 03:29:09 -04:00
|
|
|
*/
|
2002-07-17 12:23:22 -04:00
|
|
|
protected boolean getPropertyBooleanValue(final int id)
|
|
|
|
{
|
2002-05-03 03:29:09 -04:00
|
|
|
final Boolean b = (Boolean) getProperty(id);
|
2002-07-17 12:23:22 -04:00
|
|
|
if (b != null)
|
2002-05-03 03:29:09 -04:00
|
|
|
return b.booleanValue();
|
2002-07-17 12:23:22 -04:00
|
|
|
else
|
2002-05-03 03:29:09 -04:00
|
|
|
return false;
|
2002-05-11 10:47:24 -04:00
|
|
|
}
|
2002-05-03 03:29:09 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
2002-02-13 23:00:59 -05:00
|
|
|
private boolean wasNull;
|
|
|
|
|
2002-05-11 10:47:24 -04:00
|
|
|
|
2002-02-13 23:00:59 -05:00
|
|
|
/**
|
2002-07-17 12:23:22 -04:00
|
|
|
* <p>Checks whether the property which the last call to {@link
|
|
|
|
* #getPropertyIntValue} or {@link #getProperty} tried to access
|
|
|
|
* was available or not. This information might be important for
|
|
|
|
* callers of {@link #getPropertyIntValue} since the latter
|
|
|
|
* returns 0 if the property does not exist. Using {@link
|
|
|
|
* #wasNull} the caller can distiguish this case from a property's
|
|
|
|
* real value of 0.</p>
|
2002-05-11 10:47:24 -04:00
|
|
|
*
|
2002-07-17 12:23:22 -04:00
|
|
|
* @return <code>true</code> if the last call to {@link
|
|
|
|
* #getPropertyIntValue} or {@link #getProperty} tried to access a
|
|
|
|
* property that was not available, else <code>false</code>.
|
2002-02-13 23:00:59 -05:00
|
|
|
*/
|
2002-07-17 12:23:22 -04:00
|
|
|
public boolean wasNull()
|
|
|
|
{
|
2002-02-13 23:00:59 -05:00
|
|
|
return wasNull;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
2002-07-17 12:23:22 -04:00
|
|
|
* <p>Returns the PID string associated with a property ID. The ID
|
|
|
|
* is first looked up in the {@link Section}'s private
|
|
|
|
* dictionary. If it is not found there, the method calls {@link
|
|
|
|
* SectionIDMap#getPIDString}.</p>
|
2002-05-11 10:47:24 -04:00
|
|
|
*
|
2002-07-17 12:23:22 -04:00
|
|
|
* @param pid The property ID
|
2002-05-11 10:47:24 -04:00
|
|
|
*
|
2002-07-17 12:23:22 -04:00
|
|
|
* @return The property ID's string value
|
2002-02-13 23:00:59 -05:00
|
|
|
*/
|
2002-07-17 12:23:22 -04:00
|
|
|
public String getPIDString(final int pid)
|
|
|
|
{
|
2002-02-13 23:00:59 -05:00
|
|
|
String s = null;
|
2002-07-17 12:23:22 -04:00
|
|
|
if (dictionary != null)
|
2002-02-13 23:00:59 -05:00
|
|
|
s = (String) dictionary.get(new Integer(pid));
|
2002-07-17 12:23:22 -04:00
|
|
|
if (s == null)
|
2002-05-11 10:47:24 -04:00
|
|
|
s = SectionIDMap.getPIDString(getFormatID().getBytes(), pid);
|
2002-07-17 12:23:22 -04:00
|
|
|
if (s == null)
|
2002-02-13 23:00:59 -05:00
|
|
|
s = SectionIDMap.UNDEFINED;
|
|
|
|
return s;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|