Package org.apache.poi.util

Examples of org.apache.poi.util.LittleEndianByteArrayInputStream


        new DataOutputStream(baos).writeLong(_d4);
      } catch (IOException e) {
        throw new RuntimeException(e);
      }
      byte[] buf = baos.toByteArray();
      return new LittleEndianByteArrayInputStream(buf).readLong();
    }
View Full Code Here


      out.writeShort(_comboStyle);
      out.writeShort(_lineCount);
      out.writeShort(_unknownShort13);
    }
    private static Ptg readRefPtg(byte[] formulaRawBytes) {
      LittleEndianInput in = new LittleEndianByteArrayInputStream(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);
View Full Code Here

        new DataOutputStream(baos).writeLong(_d4);
      } catch (IOException e) {
        throw new RuntimeException(e);
      }
      byte[] buf = baos.toByteArray();
      return new LittleEndianByteArrayInputStream(buf).readLong();
    }
View Full Code Here

    g = createFromStreamDump("[03, 03, 00, 00, 00, 00, 00, 00, C0, 00, 00, 00, 00, 00, 00, 46]");
    assertEquals("00000303-0000-0000-C000-000000000046", g.formatAsString());
  }

  private static GUID createFromStreamDump(String s) {
    return new GUID(new LittleEndianByteArrayInputStream(HexRead.readFromString(s)));
  }
View Full Code Here

        new DataOutputStream(baos).writeLong(_d4);
      } catch (IOException e) {
        throw new RuntimeException(e);
      }
      byte[] buf = baos.toByteArray();
      return new LittleEndianByteArrayInputStream(buf).readLong();
    }
View Full Code Here

        bos.writeShort(1);
        bos.writeShort(1);
        bos.writeShort(3);
        bos.writeShort(42);
       
        LittleEndianInput in = new LittleEndianByteArrayInputStream(buf, 0, bos.getWriteIndex());
        UnicodeString.ExtRst extRst1 = new UnicodeString.ExtRst(in, bos.getWriteIndex());
        in = new LittleEndianByteArrayInputStream(buf, 0, bos.getWriteIndex());
        UnicodeString.ExtRst extRst2 = new UnicodeString.ExtRst(in, bos.getWriteIndex());
       
        assertEquals(extRst1, extRst2);
        assertEquals(extRst1.hashCode(), extRst2.hashCode());
    }
View Full Code Here

    g = createFromStreamDump("[03, 03, 00, 00, 00, 00, 00, 00, C0, 00, 00, 00, 00, 00, 00, 46]");
    assertEquals("00000303-0000-0000-C000-000000000046", g.formatAsString());
  }

  private static GUID createFromStreamDump(String s) {
    return new GUID(new LittleEndianByteArrayInputStream(HexRead.readFromString(s)));
  }
View Full Code Here

        new DataOutputStream(baos).writeLong(_d4);
      } catch (IOException e) {
        throw new RuntimeException(e);
      }
      byte[] buf = baos.toByteArray();
      return new LittleEndianByteArrayInputStream(buf).readLong();
    }
View Full Code Here

        + "00 00 00 "      // Array data: 1 col, 1 row
        + "02 01 00 00 35" // elem (type=string, len=1, "5")
    );
    assertArrayEquals(expData, data);
    int initSize = Ptg.getEncodedSizeWithoutArrayData(ptgs);
    Ptg[] ptgs2 = Ptg.readTokens(initSize, new LittleEndianByteArrayInputStream(data));
    confirmTokenClasses(ptgs2, ArrayPtg.class, IntPtg.class, FuncVarPtg.class);
  }
View Full Code Here

        new DataOutputStream(baos).writeLong(_d4);
      } catch (IOException e) {
        throw new RuntimeException(e);
      }
      byte[] buf = baos.toByteArray();
      return new LittleEndianByteArrayInputStream(buf).readLong();
    }
View Full Code Here

TOP

Related Classes of org.apache.poi.util.LittleEndianByteArrayInputStream

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.