public int encode(BerByteArrayOutputStream berOStream, boolean explicit) throws IOException { berOStream.write(octetString); int codeLength = octetString.length; codeLength += BerLength.encodeLength(berOStream, codeLength); if (explicit) { codeLength += id.encode(berOStream); } return codeLength; }
public int encode(BerByteArrayOutputStream berOStream, boolean explicit) throws IOException { berOStream.write(value); int codeLength = value.length; codeLength += BerLength.encodeLength(berOStream, codeLength); return codeLength; }
public int encode(OutputStream reverseOS, boolean withTag) throws IOException { int codeLength = BerLength.encodeLength(reverseOS, 0); if (withTag) { codeLength += tag.encode(reverseOS); } return codeLength; }
public int decode(InputStream is, boolean withTag) throws IOException { int codeLength = 0; if (withTag) { codeLength += tag.decodeAndCheck(is); } BerLength length = new BerLength(); codeLength += length.decode(is); if (length.val != 0) { throw new IOException("Decoded length of BerNull is not correct"); } return codeLength; }
public int decode(InputStream iStream, boolean explicit) throws IOException { int codeLength = 0; if (explicit) { codeLength += id.decodeAndCheck(iStream); } BerLength length = new BerLength(); codeLength += length.decode(iStream); if (length.val != 0) { throw new IOException("Decoded length of BerNull is not correct"); } return codeLength; }
public int encode(BerByteArrayOutputStream berOStream, boolean explicit) throws IOException { int codeLength = BerLength.encodeLength(berOStream, 0); if (explicit) { codeLength += id.encode(berOStream); } return codeLength; }
private void writyValToStream(ReverseByteArrayOutputStream axdrOStream, int codeLength) throws IOException { for (int i = 0; i < codeLength; i++) { int value = ((int) (val >> 8 * (i))) & 0xff; axdrOStream.write(value); } }
public BerTag(int identifierClass, int primitive, int tagNumber) { this.tagClass = identifierClass; this.primitive = primitive; this.tagNumber = tagNumber; code(); }
public int encode(BerByteArrayOutputStream berOStream) throws IOException { for (int i = (identifier.length - 1); i >= 0; i--) { berOStream.write(identifier[i]); } return identifier.length; }
public BerIdentifier(int identifierClass, int primitive, int tagNumber) { this.identifierClass = identifierClass; this.primitive = primitive; this.tagNumber = tagNumber; code(); }
public int encode(OutputStream reverseOS, boolean withTag) throws IOException { int codeLength = BerLength.encodeLength(reverseOS, 0); if (withTag) { codeLength += tag.encode(reverseOS); } return codeLength; }
public int decode(InputStream is, boolean withTag) throws IOException { int codeLength = 0; if (withTag) { codeLength += tag.decodeAndCheck(is); } BerLength length = new BerLength(); codeLength += length.decode(is); if (length.val != 0) { throw new IOException("Decoded length of BerNull is not correct"); } return codeLength; }
public int encode(BerByteArrayOutputStream berOStream, boolean explicit) throws IOException { berOStream.write(octetString); int codeLength = octetString.length; codeLength += BerLength.encodeLength(berOStream, codeLength); if (explicit) { codeLength += id.encode(berOStream); } return codeLength; }
public BerTag(int identifierClass, int primitive, int tagNumber) { this.tagClass = identifierClass; this.primitive = primitive; this.tagNumber = tagNumber; code(); }
public int encode(OutputStream reverseOS, boolean withTag) throws IOException { int codeLength = BerLength.encodeLength(reverseOS, 0); if (withTag) { codeLength += tag.encode(reverseOS); } return codeLength; }
public int encode(OutputStream reverseOS, boolean withTag) throws IOException { reverseOS.write(value); int codeLength = value.length; codeLength += BerLength.encodeLength(reverseOS, codeLength); if (withTag) { codeLength += tag.encode(reverseOS); } return codeLength; }
public int encode(OutputStream reverseOS, boolean withTag) throws IOException { reverseOS.write(value); int codeLength = value.length; codeLength += BerLength.encodeLength(reverseOS, codeLength); if (withTag) { codeLength += tag.encode(reverseOS); } return codeLength; }
public int encode(OutputStream reverseOS, boolean withTag) throws IOException { reverseOS.write(value); int codeLength = value.length; codeLength += BerLength.encodeLength(reverseOS, codeLength); if (withTag) { codeLength += tag.encode(reverseOS); } return codeLength; }
public int encode(OutputStream reverseOS, boolean withTag) throws IOException { reverseOS.write(value); int codeLength = value.length; codeLength += BerLength.encodeLength(reverseOS, codeLength); if (withTag) { codeLength += tag.encode(reverseOS); } return codeLength; }