code: @SuppressWarnings("unused")
  	private ByteBuffer readBuffer(final RandomAccessFile raf) throws IOException {
  		final int startPos = getCheckBytesFrom();
  		if (startPos > raf.length()) {
  			return null;
  		}
  		raf.seek(startPos);
  		ByteBuffer buf;
  		switch (getType()) {
  		case MagicMimeEntry.STRING_TYPE: {
  			int len = 0;
  			// Lets check if its a between test
  			final int index = this.typeStr.indexOf(">");
  			if (index != -1) {
  				len = Integer.parseInt(this.typeStr.substring(index + 1, this.typeStr.length() - 1));
  				this.isBetween = true;
  			} else {
  				len = getContent().length();
  			}
  			buf = ByteBuffer.allocate(len + 1);
  			raf.read(buf.array(), 0, len);
  			break;
  		}
  
  		case MagicMimeEntry.SHORT_TYPE:
  		case MagicMimeEntry.LESHORT_TYPE:
  		case MagicMimeEntry.BESHORT_TYPE: {
  			buf = ByteBuffer.allocate(2);
  			raf.read(buf.array(), 0, 2);
  			break;
  		}
  
  		case MagicMimeEntry.LELONG_TYPE:
  		case MagicMimeEntry.BELONG_TYPE: {
  			buf = ByteBuffer.allocate(4);
  			raf.read(buf.array(), 0, 4);
  			break;
  		}
  
  		case MagicMimeEntry.BYTE_TYPE: {
  			buf = ByteBuffer.allocate(1);
  			raf.read(buf.array(), 0, 1);
  		}
  
  		default: {
  			buf = null;
  			break;
  		}
  		}
  		return buf;
  	}
docs: Read buffer.
  
  @param raf the raf
  @return the byte buffer
  @throws IOException Signals that an I/O exception has occurred.