code: private ByteBuffer readBuffer(final byte[] content) throws IOException {
  		final int startPos = getCheckBytesFrom();
  		if (startPos > content.length) {
  			return null;
  		}
  
  		ByteBuffer buf;
  		switch (getType()) {
  		case MagicMimeEntry.STRING_TYPE: {
  			final int len = getContent().length();
  			buf = ByteBuffer.allocate(len + 1);
  			buf.put(content, startPos, len);
  			break;
  		}
  
  		case MagicMimeEntry.SHORT_TYPE:
  		case MagicMimeEntry.LESHORT_TYPE:
  		case MagicMimeEntry.BESHORT_TYPE: {
  			buf = ByteBuffer.allocate(2);
  			buf.put(content, startPos, 2);
  			break;
  		}
  
  		case MagicMimeEntry.LELONG_TYPE:
  		case MagicMimeEntry.BELONG_TYPE: {
  			buf = ByteBuffer.allocate(4);
  			buf.put(content, startPos, 4);
  			break;
  		}
  
  		case MagicMimeEntry.BYTE_TYPE: {
  			buf = ByteBuffer.allocate(1);
  			buf.put(buf.array(), startPos, 1);
  		}
  
  		default: {
  			buf = null;
  			break;
  		}
  		}
  		return buf;
  	}
docs: /*
  private methods for reading to local buffer