@Override public final void writeUTF ( String str ) throws SmbException { int len = str.length(); int ch, size = 0; byte[] dst; for ( int i = 0; i < len; i++ ) { ch = str.charAt(i); size += ch > 0x07F ? ( ch > 0x7FF ? 3 : 2 ) : 1; } dst = new byte[size]; writeShort(size); Encdec.enc_utf8(str, dst, 0, size); write(dst, 0, size); }
@Override public final void writeUTF ( String str ) throws SmbException { int len = str.length(); int ch, size = 0; byte[] dst; for ( int i = 0; i < len; i++ ) { ch = str.charAt(i); size += ch > 0x07F ? ( ch > 0x7FF ? 3 : 2 ) : 1; } dst = new byte[size]; writeShort(size); Encdec.enc_utf8(str, dst, 0, size); write(dst, 0, size); }
public final void writeUTF( String str ) throws SmbException { int len = str.length(); int ch, size = 0; byte[] dst; for( int i = 0; i < len; i++ ) { ch = str.charAt( i ); size += ch > 0x07F ? (ch > 0x7FF ? 3 : 2) : 1; } dst = new byte[size]; writeShort( size ); try { Encdec.enc_utf8( str, dst, 0, size ); } catch( IOException ioe ) { throw new SmbException( "", ioe ); } write( dst, 0, size ); } }
public final void writeUTF( String str ) throws SmbException { int len = str.length(); int ch, size = 0; byte[] dst; for( int i = 0; i < len; i++ ) { ch = str.charAt( i ); size += ch > 0x07F ? (ch > 0x7FF ? 3 : 2) : 1; } dst = new byte[size]; writeShort( size ); try { Encdec.enc_utf8( str, dst, 0, size ); } catch( IOException ioe ) { throw new SmbException( "", ioe ); } write( dst, 0, size ); } }
public final void writeUTF( String str ) throws SmbException { int len = str.length(); int ch, size = 0; byte[] dst; for( int i = 0; i < len; i++ ) { ch = str.charAt( i ); size += ch > 0x07F ? (ch > 0x7FF ? 3 : 2) : 1; } dst = new byte[size]; writeShort( size ); try { Encdec.enc_utf8( str, dst, 0, size ); } catch( IOException ioe ) { throw new SmbException( "", ioe ); } write( dst, 0, size ); } // >>SmbAuthenticator
public final void writeUTF( String str ) throws SmbException { int len = str.length(); int ch, size = 0; byte[] dst; for( int i = 0; i < len; i++ ) { ch = str.charAt( i ); size += ch > 0x07F ? (ch > 0x7FF ? 3 : 2) : 1; } dst = new byte[size]; writeShort( size ); try { Encdec.enc_utf8( str, dst, 0, size ); } catch( IOException ioe ) { throw new SmbException( "", ioe ); } write( dst, 0, size ); } }