Examples of readUnsignedShort()


Examples of com.higherfrequencytrading.chronicle.Excerpt.readUnsignedShort()

            } while (!excerpt.nextIndex());
            final long timestamp = excerpt.readLong();
            long time = System.nanoTime() - timestamp;
            if (count >= 0)
                times[count] = (int) time;
            final int nbConsolidates = excerpt.readUnsignedShort();
            assert nbConsolidates == consolidates.length;
            for (int i = 0; i < nbConsolidates; i++) {
                excerpt.readStopBit();
            }
            excerpt.finish();
View Full Code Here

Examples of com.jme3.util.LittleEndien.readUnsignedShort()

                        if (swapxy) {
                            index = i + j * size;
                        } else {
                            index = (i * size) + j;
                        }
                        heightData[index] = dis.readUnsignedShort();
                    }
                }
                dis.close();
            } else {
                DataInputStream dis = new DataInputStream(bis);
View Full Code Here

Examples of com.lightcrafts.utils.file.OrderableRandomAccessFile.readUnsignedShort()

                file.order( ByteOrder.LITTLE_ENDIAN );
            file.seek( TIFF_HEADER_SIZE - TIFF_INT_SIZE );
            int ifdOffset = file.readInt();
            while ( ifdOffset > 0 ) {
                file.seek( ifdOffset );
                final int entryCount = file.readUnsignedShort();
                for ( int entry = 0; entry < entryCount; ++entry ) {
                    final int entryOffset =
                        TIFFMetadataReader.calcIFDEntryOffset( ifdOffset, entry );
                    file.seek( entryOffset );
                    final int tagID = file.readUnsignedShort();
View Full Code Here

Examples of com.lightcrafts.utils.file.OrderableRandomAccessFile.readUnsignedShort()

                final int entryCount = file.readUnsignedShort();
                for ( int entry = 0; entry < entryCount; ++entry ) {
                    final int entryOffset =
                        TIFFMetadataReader.calcIFDEntryOffset( ifdOffset, entry );
                    file.seek( entryOffset );
                    final int tagID = file.readUnsignedShort();
                    if ( tagID == TIFF_PHOTOSHOP_IMAGE_RESOURCES ) {
                        file.seek( file.getFilePointer() - TIFF_SHORT_SIZE );
                        file.writeShort( TIFF_EXIF_IFD_POINTER );
                        file.writeShort( TIFF_FIELD_TYPE_ULONG );
                        file.writeInt( 1 );
View Full Code Here

Examples of com.peterhi.obsolete.Stream.readUnsignedShort()

      stream.writeBit(1);
     
      stream.readBit();
     
      for (int i = 0; i < sampleShorts().length; i++) {
        assertEquals(sampleShorts()[i] & 0xffff, stream.readUnsignedShort());
      }
     
      assertEquals(1, stream.getData().readable());
    } finally {
    }
View Full Code Here

Examples of davaguine.jmac.tools.ByteArrayReader.readUnsignedShort()

    public static APEDescriptor read(final File file) throws IOException {
        try {
            APEDescriptor header = new APEDescriptor();
            final ByteArrayReader reader = new ByteArrayReader(file, APE_DESCRIPTOR_BYTES - 16);
            header.cID = reader.readString(4, "US-ASCII");
            header.nVersion = reader.readUnsignedShort();
            reader.skipBytes(2);
            header.nDescriptorBytes = reader.readUnsignedInt();
            header.nHeaderBytes = reader.readUnsignedInt();
            header.nSeekTableBytes = reader.readUnsignedInt();
            header.nHeaderDataBytes = reader.readUnsignedInt();
View Full Code Here

Examples of info.ata4.io.DataInputReader.readUnsignedShort()

            List<Integer> subMeshIndices = new ArrayList<>();
            List<Integer> subMeshTriangles = new ArrayList<>();
           
            in.position(subMesh.firstByte.longValue());
            for (long j = 0; j < subMesh.indexCount.longValue(); j++) {
                subMeshIndices.add(in.readUnsignedShort());
            }
           
            // read triangle strips if topology/isTriStrip is not zero
            if (subMesh.topology.longValue() == 0) {
                // use indices as is
View Full Code Here

Examples of io.netty.buffer.ByteBuf.readUnsignedShort()

    @Override
    public ServiceRecord decode(DnsResponse response, DnsResource resource) {
        ByteBuf packet = response.content().readerIndex(resource.contentIndex());
        int priority = packet.readShort();
        int weight = packet.readShort();
        int port = packet.readUnsignedShort();
        String target = DnsResponseDecoder.readName(packet);
        return new ServiceRecord(resource.name(), priority, weight, port, target);
    }

}
View Full Code Here

Examples of java.io.DataInput.readUnsignedShort()

                            break;
                        case UnsignedByte:
                            heightData[index] = di.readUnsignedByte() * 0.5f / Byte.MAX_VALUE;
                            break;
                        case UnsignedShort:
                            heightData[index] = di.readUnsignedShort() * 0.5f / Short.MAX_VALUE;
                            break;
                        case Integer:
                            heightData[index] = di.readInt() * 0.5f / Integer.MAX_VALUE + 0.5f;
                            break;
                        case Float:
View Full Code Here

Examples of java.io.DataInputStream.readUnsignedShort()

         break;
         default:
            throw(new SocksException(Proxy.SOCKS_JUST_ERROR));
      }

      port = di.readUnsignedShort();

      if(addrType != SOCKS_ATYP_DOMAINNAME && doResolveIP){
         try{
            ip = InetAddress.getByName(host);
         }catch(UnknownHostException uh_ex){
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.