@Override
    public byte[] getBytes(final long posOrdinal, final int length) throws SQLException {
        assertNotFreed();
        final int actualLength = Math.min(length, (int) len);
        if (posOrdinal < 1 || len - posOrdinal < 0 ) {
            throw newIllegalArgumentExceptionRange("posOrdinal", 1, len,  posOrdinal);
        }

        final byte[] bytes = new byte[actualLength];
        long pos = posOrdinal -1;
        for (int i = 0; i < actualLength; i++) {
            bytes[i] = buf[(int) pos];
            pos++;
        }
        return bytes;
    }
A standard implementation of the Blob interface.
<p>
By having an implementation, we do not have to
require usage of the java.sql.rowset module.

@author Per Minborg
@since 3.2.0
runtime-parent/runtime-typemapper/src/main/java/com/speedment/runtime/typemapper/largeobject/StandardBlob.java