/// <summary> /// Create a new GENERIC Name.Component, converting the value to UTF8 bytes. /// Note, this does not escape %XX values. If you need to escape, use /// Name.fromEscapedString. /// </summary> /// /// <param name="value">The string to convert to UTF8.</param> public Component(String value_ren) { value_ = new Blob(value_ren); type_ = net.named_data.jndn.Name.Component.ComponentType.GENERIC; }
/// <summary> /// Create a new GENERIC Name.Component, copying the given value. /// (To create an ImplicitSha256Digest component, use fromImplicitSha256Digest.) /// </summary> /// /// <param name="value">The value byte array.</param> public Component(byte[] value_ren) { value_ = new Blob(value_ren, true); type_ = net.named_data.jndn.Name.Component.ComponentType.GENERIC; }
/// <summary> /// Create a new GENERIC Name.Component, using the existing the Blob value. /// (To create an ImplicitSha256Digest component, use fromImplicitSha256Digest.) /// </summary> /// /// <param name="value"></param> public Component(Blob value_ren) { if (value_ren == null) throw new NullReferenceException( "Component: Blob value may not be null"); value_ = value_ren; type_ = net.named_data.jndn.Name.Component.ComponentType.GENERIC; }
/// <summary> /// Create a new Name.Component, taking another pointer to the component's /// read-only value. /// </summary> /// /// <param name="component">The component to copy.</param> public Component(Name.Component component) { value_ = component.value_; type_ = component.type_; }
/// <summary> /// Create a new GENERIC Name.Component with a zero-length value. /// </summary> /// public Component() { value_ = new Blob(ILOG.J2CsMapping.NIO.ByteBuffer.allocate(0), false); type_ = net.named_data.jndn.Name.Component.ComponentType.GENERIC; }