1 2 17 18 package org.apache.poi.ddf; 19 20 27 abstract public class EscherProperty 28 { 29 private short id; 30 31 35 public EscherProperty( short id ) 36 { 37 this.id = id; 38 } 39 40 44 public EscherProperty( short propertyNumber, boolean isComplex, boolean isBlipId ) 45 { 46 this.id = (short)(propertyNumber + 47 (isComplex ? 0x8000 : 0x0) + 48 (isBlipId ? 0x4000 : 0x0)); 49 } 50 51 public short getId() 52 { 53 return id; 54 } 55 56 public short getPropertyNumber() 57 { 58 return (short) ( id & (short) 0x3FFF ); 59 } 60 61 public boolean isComplex() 62 { 63 return ( id & (short) 0x8000 ) != 0; 64 } 65 66 public boolean isBlipId() 67 { 68 return ( id & (short) 0x4000 ) != 0; 69 } 70 71 public String getName() 72 { 73 return EscherProperties.getPropertyName(id); 74 } 75 76 80 public int getPropertySize() 81 { 82 return 6; 83 } 84 85 89 abstract public int serializeSimplePart( byte[] data, int pos ); 90 94 abstract public int serializeComplexPart( byte[] data, int pos ); 95 } 96 | Popular Tags |