private void denyAccess ( HttpServletResponse response , String message ) throws IOException { StringBuilder sb = new StringBuilder ( ) ; sb . append ( "Fedora: 403 " ) . append ( message . toUpperCase ( ) ) ; response . reset ( ) ; response . setStatus ( HttpServletResponse . SC_FORBIDDEN ) ; response . setContentType ( "text/plain" ) ; response . setContentLength ( sb . length ( ) ) ; ServletOutputStream out = response . getOutputStream ( ) ; out . write ( sb . toString ( ) . getBytes ( ) ) ; out . flush ( ) ; out . close ( ) ; }
Outputs an access denied message .