Old/mp3_InfoManager/field_binary.cpp
/** Copies the field's internal string to the buffer.
 **
 ** It copies the data in the field into the buffer, for as many bytes as the
 ** field contains, or the size of buffer, whichever is smaller.
 **
 ** \code
 **   uchar buffer[1024];
 **   myFrame.GetField(ID3FN_DATA)->Get(buffer, sizeof(buffer));
 ** \endcode
 **/
Copies the field's internal string to the buffer.
It copies the data in the field into the buffer, for as many bytes as the
field contains, or the size of buffer, whichever is smaller.


Copies the field ' s internal string to the buffer . It copies the data in the field into the buffer for as many bytes as the field contains or the size of buffer whichever is smaller .
size_t ID3_FieldImpl::Get(uchar *buffer,    
                          size_t max_bytes 
                          ) const
{
  size_t bytes = 0;
  if (this->GetType() == ID3FTY_BINARY)
  {
    bytes = dami::min(max_bytes, this->Size());
    if (NULL != buffer && bytes > 0)
    {
      ::memcpy(buffer, _binary.data(), bytes);
    }
  }
  return bytes;
}
size_t ID3_FieldImpl :: Get ( uchar * buffer , size_t max_bytes ) const { size_t bytes = 0 ; if ( this -> GetType ( ) == ID3FTY_BINARY ) { bytes = dami :: min ( max_bytes , this -> Size ( ) ) ; if ( NULL != buffer && bytes > 0 ) { :: memcpy ( buffer , _binary . data ( ) , bytes ) ; } } return bytes ; }
Copies the field's internal string to the buffer.
Copies the field ' s internal string to the buffer .
//< Destination of retrieved string //< Max number of bytes to copy