void store(KeytabOutputStream kos) throws IOException { byte[] body = null; // compute entry body content first so that to get and write the size ByteArrayOutputStream baos = new ByteArrayOutputStream(); KeytabOutputStream subKos = new KeytabOutputStream(baos); writeBody(subKos, 0); // todo: consider the version subKos.flush(); body = baos.toByteArray(); kos.writeInt(body.length); kos.write(body); }
void store(KeytabOutputStream kos) throws IOException { byte[] body = null; // compute entry body content first so that to get and write the size ByteArrayOutputStream baos = new ByteArrayOutputStream(); KeytabOutputStream subKos = new KeytabOutputStream(baos); writeBody(subKos, 0); // todo: consider the version subKos.flush(); body = baos.toByteArray(); kos.writeInt(body.length); kos.write(body); }
public void writePrincipal(PrincipalName principal, int version) throws IOException { List<String> nameStrings = principal.getNameStrings(); int numComponents = principal.getNameStrings().size(); String realm = principal.getRealm(); writeShort(numComponents); writeCountedString(realm); for (String nameCom : nameStrings) { writeCountedString(nameCom); } writeInt(principal.getNameType().getValue()); // todo: consider the version }
public void writePrincipal(PrincipalName principal, int version) throws IOException { List<String> nameStrings = principal.getNameStrings(); int numComponents = principal.getNameStrings().size(); String realm = principal.getRealm(); writeShort(numComponents); writeCountedString(realm); for (String nameCom : nameStrings) { writeCountedString(nameCom); } writeInt(principal.getNameType().getValue()); // todo: consider the version }