Package pptViewer

Examples of pptViewer.PptException


    //System.out.println("Looking for next block for "+block);
   
    data = this.get(block*4, 4);
    int sector= (data[0]& 0x0FF)|((data[1]& 0x0FF)<<8)|((data[2]& 0x0FF)<<16)|((data[3]& 0x0FF)<<24);
   
    if (sector == OleFile.ENDOFCHAIN) throw new PptException("EndOfChain");
    if (sector == OleFile.DIFSECT) throw new PptException("DifSector");
    if (sector == OleFile.FATSECT) throw new PptException("FatSector");
    if (sector == OleFile.FREESECT) throw new PptException("FreeSector");

    return sector;
  }
View Full Code Here


   * @return Der Inhalt des Sektors
   * @throws PptException
   */
  public byte[] getDifBlock(int n) throws PptException {
    if (this.data != nullreturn this.file.getBlock(this.data[n]);
    else throw new PptException("unknown block "+n);
  }
View Full Code Here

   * @throws PptException
   */
  public byte[] getBlock(int Block) throws PptException {
    //System.out.println("Reading File-block "+Block+" from file");
   
    if (Block == OleFile.ENDOFCHAIN) throw new PptException("EndOfChain");
    if (Block == OleFile.DIFSECT) throw new PptException("DifSector");
    if (Block == OleFile.FATSECT) throw new PptException("FatSector");
    if (Block == OleFile.FREESECT) throw new PptException("FreeSector");
   
    byte[] dataArray = new byte[this.getHeader().getSecSize()];
    try {
      this.file.seek(this.getHeader().getSecSize()*Block+512);
      this.file.read(dataArray);
 
View Full Code Here

   
    data = this.getFatBlock(FatBlock);
    offset=(block-(FatBlock*sectorsPerFat))*4;
    int sector= (data[offset]& 0x0FF)|((data[offset+1]& 0x0FF)<<8)|((data[offset+2]& 0x0FF)<<16)|((data[offset+3]& 0x0FF)<<24);
   
    if (sector == OleFile.ENDOFCHAIN) throw new PptException("EndOfChain");
    if (sector == OleFile.DIFSECT) throw new PptException("DifSector");
    if (sector == OleFile.FATSECT) throw new PptException("FatSector");
    if (sector == OleFile.FREESECT) throw new PptException("FreeSector");

    return sector;
  }
View Full Code Here

TOP

Related Classes of pptViewer.PptException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.