code: @Override
      public long getBodyLength() throws JMSException {
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
              SibTr.entry(this, tc, "getBodyLength");
          long bLen;
  
          // D175063 CTS requires a MessageNotReadableException. This is entirely
          // pointless, so I'll leave the rest of the code intact, and just add a
          // call to checkBodyReadable. Perhaps the restriction can be lifted in
          // future.
          // Check that we are in read mode
          checkBodyReadable("getBodyLength");
          if (requiresInit)
              lazyInitForReading();
  
          if (dataBuffer == null) {
              bLen = 0;
              if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                  SibTr.debug(this, tc, "buffer null");
          }
          else {
              // the length is the dataBuffer length - dataStart.
              bLen = dataBuffer.length - dataStart;
          }
  
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
              SibTr.exit(this, tc, "getBodyLength", bLen);
          return bLen;
      }
docs: /*
  (non-Javadoc)
  
  @see javax.jms.BytesMessage#getBodyLength()