private static void putClassId(final ByteArrayOutputStream out, final ClassID n) { byte[] b = new byte[16]; n.write(b, 0); out.write(b, 0, b.length); } }
/** * Sets the storage class ID for this property stream. This is the Class ID * of the COM object which can read and write this property stream * @param clsidStorage Storage Class ID */ public void setStorageClsid( ClassID clsidStorage) { _storage_clsid = clsidStorage; if( clsidStorage == null) { Arrays.fill( _raw_data, _storage_clsid_offset, _storage_clsid_offset + ClassID.LENGTH, (byte) 0); } else { clsidStorage.write( _raw_data, _storage_clsid_offset); } } /**
private static void putClassId(final ByteArrayOutputStream out, final ClassID n) { byte[] b = new byte[16]; n.write(b, 0); out.write(b, 0, b.length); } }
/** * <p>Writes a 16-byte {@link ClassID} to an output stream.</p> * * @param out The stream to write to * @param n The value to write * @return The number of bytes written * @exception IOException if an I/O error occurs */ public static int writeToStream(final OutputStream out, final ClassID n) throws IOException { byte[] b = new byte[16]; n.write(b, 0); out.write(b, 0, b.length); return b.length; }
/** * Sets the storage class ID for this property stream. This is the Class ID * of the COM object which can read and write this property stream * @param clsidStorage Storage Class ID */ public void setStorageClsid( ClassID clsidStorage) { _storage_clsid = clsidStorage; if( clsidStorage == null) { Arrays.fill( _raw_data, _storage_clsid_offset, _storage_clsid_offset + ClassID.LENGTH, (byte) 0); } else { clsidStorage.write( _raw_data, _storage_clsid_offset); } } /**
/** * Sets the storage class ID for this property stream. This is the Class ID * of the COM object which can read and write this property stream * @param clsidStorage Storage Class ID */ public void setStorageClsid( ClassID clsidStorage) { _storage_clsid = clsidStorage; if( clsidStorage == null) { Arrays.fill( _raw_data, _storage_clsid_offset, _storage_clsid_offset + ClassID.LENGTH, (byte) 0); } else { clsidStorage.write( _raw_data, _storage_clsid_offset); } } /**
/** * Sets the storage class ID for this property stream. This is the Class ID * of the COM object which can read and write this property stream * @param clsidStorage Storage Class ID */ public void setStorageClsid( ClassID clsidStorage) { _storage_clsid = clsidStorage; if( clsidStorage == null) { Arrays.fill( _raw_data, _storage_clsid_offset, _storage_clsid_offset + ClassID.LENGTH, (byte) 0); } else { clsidStorage.write( _raw_data, _storage_clsid_offset); } } /**
/** * <p>Writes a 16-byte {@link ClassID} to an output stream.</p> * * @param out The stream to write to * @param n The value to write * @return The number of bytes written * @exception IOException if an I/O error occurs */ public static int writeToStream(final OutputStream out, final ClassID n) throws IOException { byte[] b = new byte[16]; n.write(b, 0); out.write(b, 0, b.length); return b.length; }