Examples of available()


Examples of ca.uhn.hl7v2.Version.available()

    ModelClassFactory mcf = getParser() != null ?
        getParser().getFactory() :
        new DefaultModelClassFactory();
    Version version = Version.versionOf(getVersion());
    Message out = null;
    if (version != null && version.available()) {
      Class<? extends Message> clazz = mcf.getMessageClass("ACK", version.getVersion(), false);
      if (clazz != null) {
          out = ReflectionUtil.instantiateMessage(clazz, mcf);
      }
    }
View Full Code Here

Examples of ch.ethz.ssh2.crypto.SimpleDERReader.available()

    SimpleDERReader dr = new SimpleDERReader(v, pos, v.length - pos);

    byte[] seq = dr.readSequenceAsByteArray();

    if (dr.available() != 0)
    {
      log.log(20, "ssh-rsa signature: dr.available() != 0");
      return false;
    }
View Full Code Here

Examples of com.alibaba.dubbo.common.io.UnsafeByteArrayInputStream.available()

                            if (msg != null) {
                                Channels.fireMessageReceived(ctx, msg, event.getRemoteAddress());
                            }
                            off = pos;
                        }
                    } while (bis.available() > 0);
                } while (readable > 0);
            } finally {
                if (remaining) {
                    int len = limit - off;
                    if (len < buf.length / 2) {
View Full Code Here

Examples of com.alibaba.dubbo.remoting.buffer.ChannelBufferInputStream.available()

        ChannelBufferInputStream is = new ChannelBufferInputStream(buffer, len);

        try {
            return decodeBody(channel, is, header);
        } finally {
            if (is.available() > 0) {
                try {
                    if (logger.isWarnEnabled()) {
                        logger.warn("Skip input stream " + is.available());
                    }
                    StreamUtils.skipUnusedStream(is);
View Full Code Here

Examples of com.esotericsoftware.kryo.io.Input.available()

  }

  public void testInputWithOffset () throws Exception {
    final byte[] buf = new byte[30];
    final Input in = new Input(buf, 10, 10);
    assertEquals(10, in.available());
  }
 
  public void testSmallBuffers() throws Exception {
    ByteBuffer buf = ByteBuffer.allocate(1024);
    ByteBufferOutputStream byteBufferOutputStream = new ByteBufferOutputStream(buf);
View Full Code Here

Examples of com.facebook.hive.orc.InStream.available()

    // read the dictionary blob
    name = new StreamName(columnId,
        OrcProto.Stream.Kind.DICTIONARY_DATA);
    in = streams.get(name);
    if (in.available() > 0) {
      dictionaryBuffer = new DynamicByteArray(dictionaryOffsets[dictionarySize],
          DUMMY_MEMORY_ESTIMATE);
      dictionaryBuffer.readAll(in);
    } else {
      dictionaryBuffer = null;
View Full Code Here

Examples of com.fasterxml.jackson.core.io.MergedStream.available()

        assertFalse(ctxt.isResourceManaged());
        ctxt.setEncoding(JsonEncoding.UTF8);
        MergedStream ms = new MergedStream(ctxt, new ByteArrayInputStream(second),
                                           first, 99, 99+5);
        // Ok, first, should have 5 bytes from first buffer:
        assertEquals(5, ms.available());
        // not supported when there's buffered stuff...
        assertFalse(ms.markSupported());
        // so this won't work, but shouldn't throw exception
        ms.mark(1);
        assertEquals((byte) 'A', ms.read());
View Full Code Here

Examples of com.google.code.or.io.XInputStream.available()

          if(parser == null) parser = this.defaultParser;
          parser.parse(is, header, context);
        }
       
        // Ensure the packet boundary
        if(is.available() != 0) {
          throw new NestableRuntimeException("assertion failed, available: " + is.available() + ", event type: " + header.getEventType());
        }
      } finally {
        is.setReadLimit(0);
      }
View Full Code Here

Examples of com.google.code.or.io.util.XDeserializer.available()

    r.fieldLength = d.readLong(4);
    r.fieldType = d.readInt(1);
    r.fieldOptions = d.readInt(2);
    r.decimalPrecision = d.readInt(1);
    r.reserved = d.readInt(2);
    if(d.available() > 0) r.defaultValue = d.readLengthCodedString();
    return r;
  }
}
View Full Code Here

Examples of com.google.common.io.LimitInputStream.available()

  @Override
  public int setBytes(int index, InputStream in, int length) throws IOException {
    LimitInputStream limit = new LimitInputStream(in, length);
    ByteStreams.copy(limit, output);
    return length - limit.available();
  }

  @Override
  public int setBytes(int index, ScatteringByteChannel in, int length) throws IOException {
    ByteBuffer buffer = ByteBuffer.allocate(length);
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.