public AttributeValue(String hexString, byte[] encoded) { wasEncoded = true; this.hexString = hexString; this.encoded = encoded; try { DerInputStream in = new DerInputStream(encoded); tag = in.tag; if (DirectoryString.ASN1.checkTag(tag)) { // has string representation this.rawString = (String) DirectoryString.ASN1.decode(in); this.escapedString = makeEscaped(rawString); } else { this.rawString = hexString; this.escapedString = hexString; } } catch (IOException e) { IllegalArgumentException iae = new IllegalArgumentException(); //FIXME message iae.initCause(e); throw iae; } }
public Object decode(BerInputStream in) throws IOException { // FIXME what about constr??? String str = null; if (DirectoryString.ASN1.checkTag(in.tag)) { // has string representation str = (String) DirectoryString.ASN1.decode(in); } else { // gets octets only in.readContent(); } byte[] bytesEncoded = new byte[in.getOffset() - in.getTagOffset()]; System.arraycopy(in.getBuffer(), in.getTagOffset(), bytesEncoded, 0, bytesEncoded.length); return new AttributeValue(str, bytesEncoded, in.tag); }
public AttributeValue(String hexString, byte[] encoded) { wasEncoded = true; this.hexString = hexString; this.encoded = encoded; try { DerInputStream in = new DerInputStream(encoded); tag = in.tag; if (DirectoryString.ASN1.checkTag(tag)) { // has string representation this.rawString = (String) DirectoryString.ASN1.decode(in); this.escapedString = makeEscaped(rawString); } else { this.rawString = hexString; this.escapedString = hexString; } } catch (IOException e) { IllegalArgumentException iae = new IllegalArgumentException(); //FIXME message iae.initCause(e); throw iae; } }
public AttributeValue(String hexString, byte[] encoded) { wasEncoded = true; this.hexString = hexString; this.encoded = encoded; try { DerInputStream in = new DerInputStream(encoded); tag = in.tag; if (DirectoryString.ASN1.checkTag(tag)) { // has string representation this.rawString = (String) DirectoryString.ASN1.decode(in); this.escapedString = makeEscaped(rawString); } else { this.rawString = hexString; this.escapedString = hexString; } } catch (IOException e) { IllegalArgumentException iae = new IllegalArgumentException(); //FIXME message iae.initCause(e); throw iae; } }
public AttributeValue(String hexString, byte[] encoded) { wasEncoded = true; this.hexString = hexString; this.encoded = encoded; try { DerInputStream in = new DerInputStream(encoded); tag = in.tag; if (DirectoryString.ASN1.checkTag(tag)) { // has string representation this.rawString = (String) DirectoryString.ASN1.decode(in); this.escapedString = makeEscaped(rawString); } else { this.rawString = hexString; this.escapedString = hexString; } } catch (IOException e) { IllegalArgumentException iae = new IllegalArgumentException(); //FIXME message iae.initCause(e); throw iae; } }
public AttributeValue(String hexString, byte[] encoded) { wasEncoded = true; this.hexString = hexString; this.encoded = encoded; try { DerInputStream in = new DerInputStream(encoded); tag = in.tag; if (DirectoryString.ASN1.checkTag(tag)) { // has string representation this.rawString = (String) DirectoryString.ASN1.decode(in); this.escapedString = makeEscaped(rawString); } else { this.rawString = hexString; this.escapedString = hexString; } } catch (IOException e) { IllegalArgumentException iae = new IllegalArgumentException(); //FIXME message iae.initCause(e); throw iae; } }
public AttributeValue(String hexString, byte[] encoded) { wasEncoded = true; this.hexString = hexString; this.encoded = encoded; try { DerInputStream in = new DerInputStream(encoded); tag = in.tag; if (DirectoryString.ASN1.checkTag(tag)) { // has string representation this.rawString = (String) DirectoryString.ASN1.decode(in); this.escapedString = makeEscaped(rawString); } else { this.rawString = hexString; this.escapedString = hexString; } } catch (IOException e) { IllegalArgumentException iae = new IllegalArgumentException(); //FIXME message iae.initCause(e); throw iae; } }
public AttributeValue(String hexString, byte[] encoded) { wasEncoded = true; this.hexString = hexString; this.encoded = encoded; try { DerInputStream in = new DerInputStream(encoded); tag = in.tag; if (DirectoryString.ASN1.checkTag(tag)) { // has string representation this.rawString = (String) DirectoryString.ASN1.decode(in); this.escapedString = makeEscaped(rawString); } else { this.rawString = hexString; this.escapedString = hexString; } } catch (IOException e) { IllegalArgumentException iae = new IllegalArgumentException(); //FIXME message iae.initCause(e); throw iae; } }
public Object decode(BerInputStream in) throws IOException { // FIXME what about constr??? String str = null; if (DirectoryString.ASN1.checkTag(in.tag)) { // has string representation str = (String) DirectoryString.ASN1.decode(in); } else { // gets octets only in.readContent(); } byte[] bytesEncoded = new byte[in.getOffset() - in.getTagOffset()]; System.arraycopy(in.getBuffer(), in.getTagOffset(), bytesEncoded, 0, bytesEncoded.length); return new AttributeValue(str, bytesEncoded, in.tag); }
public Object decode(BerInputStream in) throws IOException { // FIXME what about constr??? String str = null; if (DirectoryString.ASN1.checkTag(in.tag)) { // has string representation str = (String) DirectoryString.ASN1.decode(in); } else { // gets octets only in.readContent(); } byte[] bytesEncoded = new byte[in.getOffset() - in.getTagOffset()]; System.arraycopy(in.getBuffer(), in.getTagOffset(), bytesEncoded, 0, bytesEncoded.length); return new AttributeValue(str, bytesEncoded, in.tag); }
public Object decode(BerInputStream in) throws IOException { // FIXME what about constr??? String str = null; if (DirectoryString.ASN1.checkTag(in.tag)) { // has string representation str = (String) DirectoryString.ASN1.decode(in); } else { // gets octets only in.readContent(); } byte[] bytesEncoded = new byte[in.getOffset() - in.getTagOffset()]; System.arraycopy(in.getBuffer(), in.getTagOffset(), bytesEncoded, 0, bytesEncoded.length); return new AttributeValue(str, bytesEncoded, in.tag); }
public Object decode(BerInputStream in) throws IOException { // FIXME what about constr??? String str = null; if (DirectoryString.ASN1.checkTag(in.tag)) { // has string representation str = (String) DirectoryString.ASN1.decode(in); } else { // gets octets only in.readContent(); } byte[] bytesEncoded = new byte[in.getOffset() - in.getTagOffset()]; System.arraycopy(in.getBuffer(), in.getTagOffset(), bytesEncoded, 0, bytesEncoded.length); return new AttributeValue(str, bytesEncoded, in.tag); }
public Object decode(BerInputStream in) throws IOException { // FIXME what about constr??? String str = null; if (DirectoryString.ASN1.checkTag(in.tag)) { // has string representation str = (String) DirectoryString.ASN1.decode(in); } else { // gets octets only in.readContent(); } byte[] bytesEncoded = new byte[in.getOffset() - in.getTagOffset()]; System.arraycopy(in.getBuffer(), in.getTagOffset(), bytesEncoded, 0, bytesEncoded.length); return new AttributeValue(str, bytesEncoded, in.tag); }
public Object decode(BerInputStream in) throws IOException { // FIXME what about constr??? String str = null; if (DirectoryString.ASN1.checkTag(in.tag)) { // has string representation str = (String) DirectoryString.ASN1.decode(in); } else { // gets octets only in.readContent(); } byte[] bytesEncoded = new byte[in.getOffset() - in.getTagOffset()]; System.arraycopy(in.getBuffer(), in.getTagOffset(), bytesEncoded, 0, bytesEncoded.length); return new AttributeValue(str, bytesEncoded, in.tag); }