Examples of readByte()


Examples of org.apache.lucene.store.InputStreamDataInput.readByte()

  @Override
  public boolean load(InputStream input) throws IOException {
    DataInput in = new InputStreamDataInput(input);
    CodecUtil.checkHeader(in, CODEC_NAME, VERSION_START, VERSION_START);
    byte separatorOrig = in.readByte();
    if (separatorOrig != separator) {
      throw new IllegalStateException("separator=" + separator + " is incorrect: original model was built with separator=" + separatorOrig);
    }
    int gramsOrig = in.readVInt();
    if (gramsOrig != grams) {
View Full Code Here

Examples of org.apache.lucene.store.OutputStream.readByte()

      if (file.length() != length)
  throw new Exception("length incorrect");

      for (int j = 0; j < length; j++)
  if (file.readByte() != b)
    throw new Exception("contents incorrect");

      file.close();
    }
View Full Code Here

Examples of org.apache.lucene.store.RandomAccessInput.readByte()

      final RandomAccessInput in = data.randomAccessSlice(offset, length);
      return new Bits() {
        @Override
        public boolean get(int index) {
          try {
            return (in.readByte(index >> 3) & (1 << (index & 7))) != 0;
          } catch (IOException e) {
            throw new RuntimeException(e);
          }
        }
View Full Code Here

Examples of org.apache.poi.util.LittleEndianByteArrayInputStream.readByte()

      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

Examples of org.apache.poi.util.LittleEndianInput.readByte()

   * @param ris the RecordInputstream to read the record from
   */
  public NameRecord(RecordInputStream ris) {
    LittleEndianInput in = ris;
    field_1_option_flag                 = in.readShort();
    field_2_keyboard_shortcut           = in.readByte();
    int field_3_length_name_text        = in.readUByte();
    int field_4_length_name_definition  = in.readShort();
    field_5_externSheetIndex_plus1      = in.readShort();
    field_6_sheetNumber                 = in.readUShort();
    int f7_customMenuLen      = in.readUByte();
View Full Code Here

Examples of org.apache.poi.util.LittleEndianInputStream.readByte()

    field_6_unknown = readRawData(in, remaining);
  }

  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);
View Full Code Here

Examples of org.apache.qpid.client.message.JMSBytesMessage.readByte()

        bm.writeObject(new Float(1.7f));
        bm.writeObject(new Double(8.7d));
        bm.reset();
        assertTrue(bm.readBoolean());
        assertTrue(!bm.readBoolean());
        assertEquals((byte)2, bm.readByte());
        byte[] bytes = new byte[4];
        bm.readBytes(bytes);
        assertEquals('g', bm.readChar());
        assertEquals((short) 29, bm.readShort());
        assertEquals(101, bm.readInt());
View Full Code Here

Examples of org.apache.qpid.client.message.JMSStreamMessage.readByte()

        bm.writeObject(new Float(1.7f));
        bm.writeObject(new Double(8.7d));
        bm.reset();
        assertTrue(bm.readBoolean());
        assertTrue(!bm.readBoolean());
        assertEquals((byte)2, bm.readByte());
        byte[] bytes = new byte[4];
        bm.readBytes(bytes);
        assertEquals('g', bm.readChar());
        assertEquals((short) 29, bm.readShort());
        assertEquals(101, bm.readInt());
View Full Code Here

Examples of org.apache.sanselan.common.BinaryFileParser.readByte()

        InputStream is = new ByteArrayInputStream(segmentData);

        // Skip precision(1 Byte), height(2 Bytes), width(2 bytes) bytes.
        if (toBeProcessed > 6) {
          binaryParser.skipBytes(is, 5, INVALID_JPEG_ERROR_MSG);
          numComponents = binaryParser.readByte("Number_of_components", is,
              "Unable to read Number of components from SOF marker");
          toBeProcessed -= 6;
        } else {
          LOG.log(Level.WARNING, "Failed to SOF marker");
          return;
View Full Code Here

Examples of org.apache.thrift.protocol.TBinaryProtocol.readByte()

        Assert.assertEquals( ThriftCodec.MAGIC, protocol.readI16() );
        Assert.assertEquals( protocol.readI32() + 4, bos.writerIndex() );
        int headerLength = protocol.readI16();

        Assert.assertEquals( ThriftCodec.VERSION, protocol.readByte() );
        Assert.assertEquals( Demo.Iface.class.getName(), protocol.readString() );
        Assert.assertEquals( request.getId(), protocol.readI64() );

        if ( bis.markSupported() ) {
            bis.reset();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.