/** * Creates a mostly unitialized SHAiButtonUser object. This constructor merely copies the * coprocessors 7 byte binding code into a local cache and stores the name of the account service * file used for all user iButtons. * * <p>Since this constructor leaves data unitialized, you should be very careful with the use of * it. It is expected that after calling this constructor, the user will call <code>setiButton * </code> to finish the initialization process. On memory-starved platforms, this should help * optimize memory usage. * * @param copr The SHAiButtonCopr to which the user object is tied. This Coprocessor contains the * necessary binding code and service filename, necessary for both locating a user and * recreating his unique secret. * @see #SHAiButtonUser18(SHAiButtonCopr,OneWireContainer18,boolean,byte[]) * @see #SHAiButtonUser18(SHAiButtonCopr) */ public SHAiButtonUser18(SHAiButtonCopr copr) { // save a copy of the binding code copr.getBindCode(this.fullBindCode, 0); System.arraycopy(this.fullBindCode, 4, this.fullBindCode, 12, 3); // create string representation of service filename copr.getFilename(this.serviceFile, 0); this.strServiceFilename = new String(this.serviceFile) + "." + (int) copr.getFilenameExt(); }