]>
git.immae.eu Git - github/wallabag/wallabag.git/blob - inc/3rdparty/libraries/send2kindle/MOBIClass/PFCISRecord.php
3 * A Record of a End file
7 class PFCISRecord
extends FileObject
{
13 public function __construct($leng){
14 $this->elements
= new FileElement(array(
15 "offset0"=>new FileString("FCIS", 4), //FCIS
16 "offset4"=>new FileInt(0x014),
17 "offset8"=>new FileInt(0x10),
18 "offset12"=>new FileInt(0x01),
19 "offset16"=>new FileInt(),
20 "offset20"=>new FileInt($leng),
21 "offset24"=>new FileInt(),
22 "offset28"=>new FileInt(0x20),
23 "offset32"=>new FileInt(0x08),
24 "offset36"=>new FileShort(0x01),
25 "offset38"=>new FileShort(0x01),
26 "offset40"=>new FileInt()
29 public function getByteLength(){
30 return $this->getLength();
33 public function getLength(){
34 return $this->elements
->getByteLength();
37 public function get(){
41 public function set($elements){
42 throw new Exception("Unallowed set");
45 public function serialize() {
46 return $this->elements
->serialize();
49 public function unserialize($data) {
50 $this->elements
->unserialize($data);
53 public function __toString(){
54 $output = "PalmDoc Record (".$this->getByteLength()." bytes):\n";
55 $output .= $this->elements
;