Returns the number of bytes in the <code>BLOB</code> value designated
by this <code>Blob</code> object.

@return length of the <code>BLOB</code> in bytes
@throws SQLException if there is an error accessing the length of the
<code>BLOB</code>
359578
public synchronized long length() throws SQLException {

        try {
            return blob.length(session);
        } catch (HsqlException e) {
            throw Util.sqlException(e);
        }
    }
1166799
public int size() {
        int count = 0;

        for (int i = 0, size = mScrapLength.size(); i < size; i++) {
            int val = mScrapLength.valueAt(i);
            count += val;
        }

        return count;
    }
304123
public int getSize() {
    if (mPooledByteBufferRef != null && mPooledByteBufferRef.get() != null) {
      return mPooledByteBufferRef.get().size();
    }
    return mStreamSize;
  }
1226979
protected long getSerializedBytesLength()
                    throws ObjectManagerException
    {
        final String methodName = "getSerializedBytesLength";
        if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
            trace.entry(this,
                        cclass,
                        methodName);

        // Mimic the action of getSerializedBytes but don't actuallly create the bytes.
        // Used to esimate the length of future attempts to serialize the Object.
        class DummyOutputStream extends java.io.OutputStream {

            public void write(int b)
                            throws java.io.IOException
            {}

        } // class DummyOutputStream.
        java.io.DataOutputStream dataOutputStream = new java.io.DataOutputStream(new DummyOutputStream());

        try {
            if (this instanceof SimplifiedSerialization) {
                int signature = getSignature();
                dataOutputStream.writeInt(signature);
                if (signature == SimplifiedSerialization.signature_Generic) {
                    dataOutputStream.writeUTF(getClass().getName());
                } // if (signature == SimplifiedSerialization.signature_Generic).

                ((SimplifiedSerialization) this).writeObject(dataOutputStream);

            } else {
                dataOutputStream.writeInt(SimplifiedSerialization.signature_DefaultSerialization);

                java.io.ObjectOutputStream objectOutputStream = new java.io.ObjectOutputStream(dataOutputStream);
                objectOutputStream.writeObject(this);
                objectOutputStream.close();
            }
        } catch (java.io.IOException exception) {
            // No FFDC Code Needed.
            ObjectManager.ffdc.processException(this, cclass, methodName, exception, "1:707:1.34");

            if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
                trace.exit(this,
                           cclass,
                           methodName,
                           exception);
            throw new PermanentIOException(this,
                                           exception);
        } // catch.

        if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
            trace.exit(cclass,
                       methodName,
                       new Object[] { dataOutputStream,
                                     new Long(dataOutputStream.size()) });
        return dataOutputStream.size();
    }
475816
public Blob getBlob(int arg0) throws SQLException {
        try {
            Blob blob = rsetImpl.getBlob(arg0); 
            if (blob != null && freeResourcesOnClose)
                blobs.add(blob); 
            return blob; 
        } catch (SQLException ex) {
            FFDCFilter.processException(ex, "com.ibm.ws.rsadapter.jdbc.WSJdbcResultSet.getBlob", "754", this);
            throw WSJdbcUtil.mapException(this, ex);
        } catch (NullPointerException nullX) {
            // No FFDC code needed; we might be closed.
            throw runtimeXIfNotClosed(nullX);
        }
    }
243596
@Override
    public int size() {
        // Try a few times to get accurate count. On failure due to
        // continuous async changes in table, resort to locking.
        final Segment<K,V>[] segments = this.segments;
        int size;
        boolean overflow; // true if size overflows 32 bits
        long sum;         // sum of modCounts
        long last = 0L;   // previous sum
        int retries = -1; // first iteration isn't retry
        try {
            for (;;) {
                if (retries++ == RETRIES_BEFORE_LOCK) {
                    for (int j = 0; j < segments.length; ++j)
                     {
                      ensureSegment(j).lock(); // force creation
                    }
                }
                sum = 0L;
                size = 0;
                overflow = false;
                for (int j = 0; j < segments.length; ++j) {
                    Segment<K,V> seg = segmentAt(segments, j);
                    if (seg != null) {
                        sum += seg.modCount;
                        int c = seg.count;
                        if (c < 0 || (size += c) < 0) {
                          overflow = true;
                        }
                    }
                }
                if (sum == last) {
                  break;
                }
                last = sum;
            }
        } finally {
            if (retries > RETRIES_BEFORE_LOCK) {
                for (int j = 0; j < segments.length; ++j) {
                  segmentAt(segments, j).unlock();
                }
            }
        }
        return overflow ? Integer.MAX_VALUE : size;
    }
344819
protected String getStringImpl() throws SQLException {

        try {
            return StringConverter.inputStreamToString(getBinaryStreamImpl(),
                    "US-ASCII");
        } catch (IOException ex) {
            throw Exceptions.transformFailed(ex);
        }
    }
458937
private String readBlobAsString(Blob logBlob) throws SQLException {
    if (logBlob == null) {
      return StringUtils.EMPTY;
    }

    byte[] ba = logBlob.getBytes(1L, (int) (logBlob.length()));

    if (ba == null) {
      return StringUtils.EMPTY;
    }
    String baString = Base64.encodeBase64String(ba);
    return baString;
  }
1335797
@Override
    public int size () {
        int size = Smb2Constants.SMB2_HEADER_LENGTH + 56;
        int dataLength = 0;
        if ( this.inputData != null ) {
            dataLength += this.inputData.size();
        }
        if ( this.outputData != null ) {
            dataLength += this.outputData.size();
        }
        return size8(size + dataLength);
    }
1007859
@Override
    public int getInContainerRowCount(BBContainer tupleData) {
        // according to TableOutputStream.cpp:TupleOutputStream::endRows() the row count is
        // at offset 4 (second integer)
        ByteBuffer bb = tupleData.b().duplicate();
        bb.position(getHeaderSize());
        bb.getInt(); // skip first four (partition id)

        return bb.getInt();
    }
196579
@Override
	public int getMinPrefixLengthForBlock() {
		int count = getDivisionCount();
		int totalPrefix = getBitCount();
		for(int i = count - 1; i >= 0 ; i--) {
			AddressDivisionBase div = getDivision(i);
			int segBitCount = div.getBitCount();
			int segPrefix = div.getMinPrefixLengthForBlock();
			if(segPrefix == segBitCount) {
				break;
			} else {
				totalPrefix -= segBitCount;
				if(segPrefix != 0) {
					totalPrefix += segPrefix;
					break;
				}
			}
		}
		return totalPrefix;
	}
767089
@Override
	public int size() {
		Long longSize = 0L;
		try {
			longSize = new Long(redisManager.dbSize(keySerializer.serialize(this.keyPrefix + "*")));
		} catch (SerializationException e) {
			logger.error("get keys error", e);
		}
		return longSize.intValue();
	}
481752
public long size()
                    throws ObjectManagerException
    {
        if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
            trace.entry(this, cclass,
                        "size");

        //TODO Need to include toBeDeleted.
        long listLength = size; // For return;

        if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
            trace.exit(this, cclass,
                       "size",
                       "returns listLength=" + listLength + "(int)");
        return listLength;
    }
11204
public int freeBytes()
    {
        if (tc.isEntryEnabled())
            Tr.entry(tc, "freeBytes", this);

        int freeBytes = 0;

        try
        {
            int currentCursorPosition = _fileBuffer.position();
            int fileLength = _fileBuffer.capacity();

            freeBytes = fileLength - currentCursorPosition;

            if (freeBytes < 0)
            {
                freeBytes = 0;
            }
        } catch (Throwable exc)
        {
            FFDCFilter.processException(exc, "com.ibm.ws.recoverylog.spi.LogFileHandle.freeBytes", "956", this);
            freeBytes = 0;
        }

        if (tc.isEntryEnabled())
            Tr.exit(tc, "freeBytes", new Integer(freeBytes));

        return freeBytes;
    }
672845
private acolyte.jdbc.Blob createBlob(InputStream stream, long length) 
        throws SQLException {

        final acolyte.jdbc.Blob blob = acolyte.jdbc.Blob.Nil();

        blob.setBytes(0L, createBytes(stream, length));

        return blob;
    }
608940
public double getLength() {
		double len = 0;
		if (!isEmpty()) {
			for (Polygon polygon : polygons) {
				len += polygon.getLength();
			}
		}
		return len;
	}
766596
public int readByte()
        throws IOException
    {
        if (_chunkLength > 0) {
            _chunkLength--;
            if (_chunkLength == 0 && _isLastChunk)
                _chunkLength = END_OF_DATA;

            return read();
        }
        else if (_chunkLength == END_OF_DATA) {
            _chunkLength = 0;
            return -1;
        }

        int tag = read();

        switch (tag) {
            case 'N':
                return -1;

            case 'B':
            case 'b':
                _isLastChunk = tag == 'B';
                _chunkLength = (read() << 8) + read();

                int value = parseByte();

                // special code so successive read byte won't
                // be read as a single object.
                if (_chunkLength == 0 && _isLastChunk)
                    _chunkLength = END_OF_DATA;

                return value;

            default:
                throw new IOException("expected 'B' at " + (char) tag);
        }
    }