private void encodeAET(String aet) { int endpos = pos + 16; putString(aet); while (pos < endpos) put(0x20); }
private void encodePDVHeader(int last) { final int endpos = pos; final int pdvlen = endpos - pdvpos - 4; pos = pdvpos; putInt(pdvlen); put(pdvpcid); put(pdvcmd | last); pos = endpos; Association.LOG.trace("{} << PDV[len={}, pcid={}, mch={}]", new Object[] { as, pdvlen, pdvpcid, (pdvcmd | last) }); }
@Override public void write(int b) throws IOException { checkThread(); flushPDataTF(); put(b); }
private void encodePDVHeader(int last) { final int endpos = pos; final int pdvlen = endpos - pdvpos - 4; pos = pdvpos; putInt(pdvlen); put(pdvpcid); put(pdvcmd | last); pos = endpos; Association.LOG.trace("{} << PDV[len={}, pcid={}, mch={}]", new Object[] { as, pdvlen, pdvpcid, (pdvcmd | last) }); }
private void encode(byte[] b) { putShort(b.length); put(b, 0, b.length); }
@Override public void write(int b) throws IOException { checkThread(); flushPDataTF(); put(b); }
private void encodeAET(String aet) { int endpos = pos + 16; putString(aet); while (pos < endpos) put(0x20); }
private void encode(byte[] b) { putShort(b.length); put(b, 0, b.length); }
private void encode(PresentationContext pc, int pcItemType) { encodeItemHeader(pcItemType, pc.length()); put(pc.getPCID()); put(0); put(pc.getResult()); put(0); encodeStringItem(ItemType.ABSTRACT_SYNTAX, pc.getAbstractSyntax()); for (String ts : pc.getTransferSyntaxes()) encodeStringItem(ItemType.TRANSFER_SYNTAX, ts); }
@Override public void write(byte[] b, int off, int len) throws IOException { checkThread(); int pos = off; int remaining = len; while (remaining > 0) { flushPDataTF(); int write = Math.min(remaining, free()); put(b, pos, write); pos += write; remaining -= write; } }
@Override public void write(byte[] b, int off, int len) throws IOException { checkThread(); int pos = off; int remaining = len; while (remaining > 0) { flushPDataTF(); int write = Math.min(remaining, free()); put(b, pos, write); pos += write; remaining -= write; } }
private void encode(UserIdentityRQ userIdentity) { if (userIdentity == null) return; encodeItemHeader(ItemType.RQ_USER_IDENTITY, userIdentity.length()); put(userIdentity.getType()); put(userIdentity.isPositiveResponseRequested() ? 1 : 0); encode(userIdentity.getPrimaryField()); encode(userIdentity.getSecondaryField()); }
private void encode(UserIdentityRQ userIdentity) { if (userIdentity == null) return; encodeItemHeader(ItemType.RQ_USER_IDENTITY, userIdentity.length()); put(userIdentity.getType()); put(userIdentity.isPositiveResponseRequested() ? 1 : 0); encode(userIdentity.getPrimaryField()); encode(userIdentity.getSecondaryField()); }
private void encode(ExtendedNegotiation extNeg) { encodeItemHeader(ItemType.EXT_NEG, extNeg.length()); encode(extNeg.getSOPClassUID()); put(extNeg.getInformation()); }
private void encode(ExtendedNegotiation extNeg) { encodeItemHeader(ItemType.EXT_NEG, extNeg.length()); encode(extNeg.getSOPClassUID()); put(extNeg.getInformation()); }