code: public String getServer() {
          String str = url.getHost();
          if( str.length() == 0 ) {
              return null;
          }
          return str;
      }
docs: Retrieve the hostname of the server for this SMB resource. If this
  <code>SmbFile</code> references a workgroup, the name of the workgroup
  is returned. If this <code>SmbFile</code> refers to the root of this
  SMB network hierarchy, <code>null</code> is returned.
  
  @return  The server or workgroup name or <code>null</code> if this
  <code>SmbFile</code> refers to the root <code>smb1://</code> resource.