protected void doFile( HttpServletRequest req, HttpServletResponse resp, SmbFile file ) throws IOException { byte[] buf = new byte[8192]; SmbFileInputStream in; ServletOutputStream out; String url, type; int n; in = new SmbFileInputStream( file ); out = resp.getOutputStream(); url = file.getPath(); resp.setContentType( "text/plain" ); if(( n = url.lastIndexOf( '.' )) > 0 && ( type = url.substring( n + 1 )) != null && type.length() > 1 && type.length() < 6 ) { resp.setContentType( mimeMap.getMimeType( type )); } resp.setHeader( "Content-Length", file.length() + "" ); resp.setHeader( "Accept-Ranges", "Bytes" ); while(( n = in.read( buf )) != -1 ) { out.write( buf, 0, n ); } } protected int compareNames( SmbFile f1, String f1name, SmbFile f2 ) throws IOException {
protected void doFile( HttpServletRequest req, HttpServletResponse resp, SmbFile file ) throws IOException { byte[] buf = new byte[8192]; SmbFileInputStream in; ServletOutputStream out; String url, type; int n; in = new SmbFileInputStream( file ); out = resp.getOutputStream(); url = file.getPath(); resp.setContentType( "text/plain" ); if(( n = url.lastIndexOf( '.' )) > 0 && ( type = url.substring( n + 1 )) != null && type.length() > 1 && type.length() < 6 ) { resp.setContentType( mimeMap.getMimeType( type )); } resp.setHeader( "Content-Length", file.length() + "" ); resp.setHeader( "Accept-Ranges", "Bytes" ); while(( n = in.read( buf )) != -1 ) { out.write( buf, 0, n ); } } protected int compareNames( SmbFile f1, String f1name, SmbFile f2 ) throws IOException {
protected void doFile( HttpServletRequest req, HttpServletResponse resp, SmbFile file ) throws IOException { byte[] buf = new byte[8192]; SmbFileInputStream in; ServletOutputStream out; String url, type; int n; in = new SmbFileInputStream( file ); out = resp.getOutputStream(); url = file.getPath(); resp.setContentType( "text/plain" ); if(( n = url.lastIndexOf( '.' )) > 0 && ( type = url.substring( n + 1 )) != null && type.length() > 1 && type.length() < 6 ) { resp.setContentType( mimeMap.getMimeType( type )); } resp.setHeader( "Content-Length", file.length() + "" ); resp.setHeader( "Accept-Ranges", "Bytes" ); while(( n = in.read( buf )) != -1 ) { out.write( buf, 0, n ); } } protected int compareNames( SmbFile f1, String f1name, SmbFile f2 ) throws IOException {
protected void doFile( HttpServletRequest req, HttpServletResponse resp, SmbFile file ) throws IOException { byte[] buf = new byte[8192]; SmbFileInputStream in; ServletOutputStream out; String url, type; int n; in = new SmbFileInputStream( file ); out = resp.getOutputStream(); url = file.getPath(); resp.setContentType( "text/plain" ); if(( n = url.lastIndexOf( '.' )) > 0 && ( type = url.substring( n + 1 )) != null && type.length() > 1 && type.length() < 6 ) { resp.setContentType( mimeMap.getMimeType( type )); } resp.setHeader( "Content-Length", file.length() + "" ); resp.setHeader( "Accept-Ranges", "Bytes" ); while(( n = in.read( buf )) != -1 ) { out.write( buf, 0, n ); } } protected int compareNames( SmbFile f1, String f1name, SmbFile f2 ) throws IOException {
protected void processAccessControlEntries(final ResponseData responseData, final SmbFile file) { try { final ACE[] aces = file.getSecurity(resolveSids); if (aces != null) { responseData.addMetaData(SMB_ACCESS_CONTROL_ENTRIES, aces); } } catch (final IOException e) { throw new RobotCrawlAccessException("Could not access " + file.getPath(), e); } }
protected void processAccessControlEntries(final ResponseData responseData, final SmbFile file) { try { final ACE[] aces = file.getSecurity(resolveSids); if (aces != null) { final Set<SID> sidSet = new HashSet<>(); for (ACE ace : aces) { if (logger.isDebugEnabled()) { logger.debug("ACE:" + ace); } processAllowedSIDs(file, ace.getSID(), sidSet); } responseData.addMetaData(SMB_ALLOWED_SID_ENTRIES, sidSet.toArray(new SID[sidSet.size()])); } } catch (final IOException e) { throw new CrawlingAccessException("Could not access " + file.getPath(), e); } }
protected void processAccessControlEntries(final ResponseData responseData, final SmbFile file) { try { final ACE[] aces = file.getSecurity(resolveSids); if (aces != null) { responseData.addMetaData(SMB_ACCESS_CONTROL_ENTRIES, aces); } } catch (final IOException e) { throw new RobotCrawlAccessException("Could not access " + file.getPath(), e); } }
protected void processAccessControlEntries(final ResponseData responseData, final SmbFile file) { try { final ACE[] aces = file.getSecurity(resolveSids); if (aces != null) { responseData.addMetaData(SMB_ACCESS_CONTROL_ENTRIES, aces); } } catch (final IOException e) { throw new RobotCrawlAccessException("Could not access " + file.getPath(), e); } }