@Override protected byte[] convert(String value) { return HexUtil.hexToBytes(value); }
public static byte[] hexToBytes(String s) { return hexToBytes(s, 0); }
public static byte[] hexToBytes(String s, int off) { byte[] bs = new byte[off + (1 + s.length()) / 2]; hexToBytes(s, bs, off); return bs; }
@Override public Object getResultSetValue(ResultSet resultSet) throws SQLException { String str = resultSet.getString(getField().getName()); if (str == null) { return null; } int pos = str.indexOf('-'); byte[] id = HexUtil.hexToBytes(str.substring(0, pos)); long size = Long.parseLong(str.substring(pos + 1)); return CDOLobUtil.createClob(id, size); }
@Override public Object getResultSetValue(ResultSet resultSet) throws SQLException { String str = resultSet.getString(getField().getName()); if (str == null) { return null; } int pos = str.indexOf('-'); byte[] id = HexUtil.hexToBytes(str.substring(0, pos)); long size = Long.parseLong(str.substring(pos + 1)); return CDOLobUtil.createBlob(id, size); }
blobChar = null; byte[] firstByte = HexUtil.hexToBytes(new String(firstChars)); blob.write(firstByte, 0, 1); byte[] buf = HexUtil.hexToBytes(new String(ch)); blob.write(buf);
protected Object value(Attributes attributes) { String type = attributes.getValue(FEATURE_TYPE); if (TYPE_BLOB.equals(type)) { byte[] id = HexUtil.hexToBytes(attributes.getValue(FEATURE_ID)); long size = Long.parseLong(attributes.getValue(FEATURE_SIZE)); return CDOLobUtil.createBlob(id, size); } if (TYPE_CLOB.equals(type)) { byte[] id = HexUtil.hexToBytes(attributes.getValue(FEATURE_ID)); long size = Long.parseLong(attributes.getValue(FEATURE_SIZE)); return CDOLobUtil.createClob(id, size); } if (TYPE_FEATURE_MAP.equals(type)) { String innerFeatureName = attributes.getValue(FEATURE_INNER_FEATURE); EStructuralFeature innerFeature = revision.getEClass().getEStructuralFeature(innerFeatureName); String innerType = attributes.getValue(FEATURE_INNER_TYPE); Object innerValue = value(attributes, innerType); return CDORevisionUtil.createFeatureMapEntry(innerFeature, innerValue); } return value(attributes, type); }
byte[] id = HexUtil.hexToBytes(entry.getKey()); Object lob = entry.getValue(); if (lob instanceof byte[])
byte[] id = HexUtil.hexToBytes(attributes.getValue(LOB_ID)); long size = Long.parseLong(attributes.getValue(LOB_SIZE)); blob = handler.handleBlob(id, size); byte[] id = HexUtil.hexToBytes(attributes.getValue(LOB_ID)); long size = Long.parseLong(attributes.getValue(LOB_SIZE)); clob = handler.handleClob(id, size);
while (resultSet.next()) byte[] id = HexUtil.hexToBytes(resultSet.getString(1)); long size = resultSet.getLong(2); InputStream inputStream = resultSet.getBinaryStream(3);