static LittleEndianInput getLEI(InputStream is) { if (is instanceof LittleEndianInput) { // accessing directly is an optimisation return (LittleEndianInput) is; } // less optimal, but should work OK just the same. Often occurs in junit tests. return new LittleEndianInputStream(is); }
/** * * @param is inputStream * @param bitSet call {@link #handleRecord(int, byte[])} only on those records in this bitSet */ protected XSSFBParser(InputStream is, BitSet bitSet) { this.is = new LittleEndianInputStream(is); records = bitSet; }
public XSSFBParser(InputStream is) { this.is = new LittleEndianInputStream(is); records = null; }
private static Ptg readRefPtg(byte[] formulaRawBytes) { LittleEndianInput in = new LittleEndianInputStream(new ByteArrayInputStream(formulaRawBytes)); byte ptgSid = in.readByte(); switch(ptgSid) { case AreaPtg.sid: return new AreaPtg(in); case Area3DPtg.sid: return new Area3DPtg(in); case RefPtg.sid: return new RefPtg(in); case Ref3DPtg.sid: return new Ref3DPtg(in); } return null; }
throws NoPropertySetStreamException, MarkUnsupportedException, UnsupportedEncodingException, IOException { stream.mark(PropertySet.OFFSET_HEADER+ClassID.LENGTH+1); LittleEndianInputStream leis = new LittleEndianInputStream(stream); int byteOrder = leis.readUShort(); int format = leis.readUShort();
dis.close(); CryptoAPIDocumentInputStream sbis = new CryptoAPIDocumentInputStream(this, bos.toByteArray()); LittleEndianInputStream leis = new LittleEndianInputStream(sbis); POIFSFileSystem fsOut = null; try {
static LittleEndianInput getLEI(InputStream is) { if (is instanceof LittleEndianInput) { // accessing directly is an optimisation return (LittleEndianInput) is; } // less optimal, but should work OK just the same. Often occurs in junit tests. return new LittleEndianInputStream(is); }
static LittleEndianInput getLEI(InputStream is) { if (is instanceof LittleEndianInput) { // accessing directly is an optimisation return (LittleEndianInput) is; } // less optimal, but should work OK just the same. Often occurs in junit tests. return new LittleEndianInputStream(is); }
/** * * @param is inputStream * @param bitSet call {@link #handleRecord(int, byte[])} only on those records in this bitSet */ protected XSSFBParser(InputStream is, BitSet bitSet) { this.is = new LittleEndianInputStream(is); records = bitSet; }
static LittleEndianInput getLEI(InputStream is) { if (is instanceof LittleEndianInput) { // accessing directly is an optimisation return (LittleEndianInput) is; } // less optimal, but should work OK just the same. Often occurs in junit tests. return new LittleEndianInputStream(is); }
public XSSFBParser(InputStream is) { this.is = new LittleEndianInputStream(is); records = null; }
public Biff8DecryptingStream(InputStream in, int initialOffset, Biff8EncryptionKey key) { _rc4 = new Biff8RC4(initialOffset, key); if (in instanceof LittleEndianInput) { // accessing directly is an optimisation _le = (LittleEndianInput) in; } else { // less optimal, but should work OK just the same. Often occurs in junit tests. _le = new LittleEndianInputStream(in); } }
public Biff8DecryptingStream(InputStream in, int initialOffset, Biff8EncryptionKey key) { _rc4 = new Biff8RC4(initialOffset, key); if (in instanceof LittleEndianInput) { // accessing directly is an optimisation _le = (LittleEndianInput) in; } else { // less optimal, but should work OK just the same. Often occurs in junit tests. _le = new LittleEndianInputStream(in); } }
/** * For the Document Encryption Atom */ protected DocumentEncryptionAtom(byte[] source, int start, int len) { // Get the header _header = new byte[8]; System.arraycopy(source,start,_header,0,8); ByteArrayInputStream bis = new ByteArrayInputStream(source, start+8, len-8); try (LittleEndianInputStream leis = new LittleEndianInputStream(bis)) { ei = new EncryptionInfo(leis, EncryptionMode.cryptoAPI); } catch (IOException e) { throw new EncryptedDocumentException(e); } }
private static Ptg readRefPtg(byte[] formulaRawBytes) { LittleEndianInput in = new LittleEndianInputStream(new ByteArrayInputStream(formulaRawBytes)); byte ptgSid = in.readByte(); switch(ptgSid) { case AreaPtg.sid: return new AreaPtg(in); case Area3DPtg.sid: return new Area3DPtg(in); case RefPtg.sid: return new RefPtg(in); case Ref3DPtg.sid: return new Ref3DPtg(in); } return null; }
private static Ptg readRefPtg(byte[] formulaRawBytes) { LittleEndianInput in = new LittleEndianInputStream(new ByteArrayInputStream(formulaRawBytes)); byte ptgSid = in.readByte(); switch(ptgSid) { case AreaPtg.sid: return new AreaPtg(in); case Area3DPtg.sid: return new Area3DPtg(in); case RefPtg.sid: return new RefPtg(in); case Ref3DPtg.sid: return new Ref3DPtg(in); } return null; }
private static Ptg readRefPtg(byte[] formulaRawBytes) { LittleEndianInput in = new LittleEndianInputStream(new ByteArrayInputStream(formulaRawBytes)); byte ptgSid = in.readByte(); switch(ptgSid) { case AreaPtg.sid: return new AreaPtg(in); case Area3DPtg.sid: return new Area3DPtg(in); case RefPtg.sid: return new RefPtg(in); case Ref3DPtg.sid: return new Ref3DPtg(in); } return null; }
public HemfExtractor(InputStream is) throws IOException { stream = new LittleEndianInputStream(is); header = new HemfHeader(); long recordId = stream.readUInt(); long recordSize = stream.readUInt(); header = new HemfHeader(); header.init(stream, recordId, recordSize-8); }
public void read(byte[] data, int offset){ @SuppressWarnings("resource") LittleEndianInputStream leis = new LittleEndianInputStream( new ByteArrayInputStream(data, offset, RECORD_LENGTH)); wmfsize = leis.readInt(); int left = leis.readInt(); int top = leis.readInt(); int right = leis.readInt(); int bottom = leis.readInt(); bounds.setBounds(left, top, right-left, bottom-top); int width = leis.readInt(); int height = leis.readInt(); size.setSize(width, height); zipsize = leis.readInt(); compression = leis.readUByte(); filter = leis.readUByte(); }
throws NoPropertySetStreamException, MarkUnsupportedException, UnsupportedEncodingException, IOException { stream.mark(PropertySet.OFFSET_HEADER+ClassID.LENGTH+1); LittleEndianInputStream leis = new LittleEndianInputStream(stream); int byteOrder = leis.readUShort(); int format = leis.readUShort();