111112113114115116117
{ int available = inputStream.available(); byte byteBuf[] = new byte[available]; int nbytes = inputStream.read(byteBuf); inputStream.close(); return new AnyBinary(byteBuf); }
213214215216217218219220221222223
case Types.BINARY: case Types.VARBINARY: case Types.LONGVARBINARY: byte[] bytes = set.getBytes(field); if (bytes != null) { return new AnyBinary(bytes); } else { return Any.NULL; } case Types.REF:
405406407408409410411412413414415
case Types.BINARY: case Types.VARBINARY: case Types.LONGVARBINARY: byte[] bytes = stmt.getBytes(field); if (bytes != null) { return new AnyBinary(bytes); } else { return Any.NULL; } case Types.REF:
123124125126127128129130131132
public Any m_getContent(Context context) { ByteArrayOutputStream output = new ByteArrayOutputStream(); try { _resource.writeTo(output); return new AnyBinary(output.toByteArray()); } catch (IOException e) { throw context.exception(e); } }
172173174175176177178179180181
/// @synopsis binary getBinaryContent() public static final Any getBinaryContent(Context context) { OutputStream o = context.getOutputStream(); if ((o != null) && (o instanceof ByteArrayOutputStream)) { return new AnyBinary(((ByteArrayOutputStream)o).toByteArray()); } else { return Any.NULL; } }
192193194195196197198199200201202
int length = parameters[2].toInt(); if (offset < 0) { offset = 0; } if (offset >= size) { new AnyBinary(); } if (offset + length > size) { length = size - offset; } return Any.create(_cipher.update(data, offset, length));