Need a mechanism for turning ON/OFF SOPs

hi all,
please help me in finding a solution::: the scenario is I have some 20
classes and each has 2 methods and those methods has
System.out.println(" some text "). i need a mechanism to turn ON/ OFF
the SOPs to be printed in the console.
I have two possible ways
1. using javaw instead of java which will bypass the console.
2. using an if condition
for eg:[
class A
boolean a = false;
if(false)
System.out.println("some text");
}but I need to have this IF condition check at each n every method is
there any possibility that I can have only one check that can turn
ON /OFF the SOPs
or please help me with other alternatives.
thanks in advance

Or just use a small class rather than create your own PrintStream:public class Outputter {
    private static boolean enabled;
    public static void setEnabled(boolean b) {
        enabled = b;
    public static void println(String s) {
        if(enabled) System.out.println(s);
}

Similar Messages

  • My Iphone 4s is not deleting phone numbers permanently. I will go in to delete them, however, the phone still has them saved. I can see this when I go to text people. What do I need to do to turn this off? I'm sure it is simple.

    My Iphone 4s is not deleting phone numbers permanently. I will go in to delete them, however, the phone still has them saved. I can see this when I go to text people. What do I need to do to turn this off? I'm sure it is simple.

    I don't want them ALL deleted just certain ones...you know?

  • Need conversion mechanism for converting 24 bit image to 16 bit

    In my java project I need to convert 24 bit image to 16 bit image. I don't have any clue. Please provide me the option to implement it.
    Thanks,
    jai

    That doesn't tell me much, and I know what you're talking about. I doubt that it tells the OP anything useful whatsoever.Sorry EJP, it was a mouthful I know. Maybe this will help instead, a ColorConversionOps class to work on *32 bit > 16 bit > 32 bit colors*. To help clarify where the 16 bit color input and output goes, some of the methods return or require parameters of type short. Also take notice the bitmask for variables of type short vs the bitmasks for int. AND pay particular attention to the unsigned right bit-shifting of the most-significant-digit.
    public class ColorConversionOps
      public static short convert32_16(int rgb) {
        int a = ((rgb & 0xF0000000) >>> 16);
        int r = ((rgb & 0x00F00000) >>  12);
        int g = ((rgb & 0x0000F000) >>   8);
        int b = ((rgb & 0x000000F0) >>   4);
        return (short)( a | r | g | b);
      public static int convert16_32(short rgb) {
        int a = ((rgb & 0xF000) << 16);
        int r = ((rgb & 0x0F00) << 12);
        int g = ((rgb & 0x00F0) <<  8);
        int b = ((rgb & 0x000F) <<  4);
        return (a | r | g | b);
      public static void printRGB_32(int rgb) {
        System.out.println("a="+((rgb & 0xFF000000) >>> 24));
        System.out.println("r="+((rgb & 0x00FF0000) >>  16));
        System.out.println("g="+((rgb & 0x0000FF00) >>  8));
        System.out.println("b="+ (rgb & 0x000000FF));
        System.out.println();
      public static void printRGB_16(short rgb) {
        System.out.println("a="+((rgb & 0xF000) >>> 12));
        System.out.println("r="+((rgb & 0x0F00) >>  8));
        System.out.println("g="+((rgb & 0x00F0) >>  4));
        System.out.println("b="+ (rgb & 0x000F));
        System.out.println();
    }Now to make the conversion from 32 bit color to 16 bit color and back. NOTICE there willl be a loss of precision -- just like someone else has already said.
    public class Test
      public static void main(String[] args)
        int rgb = 0xFFFFFFFF;
        ColorConversionOps.printRGB_32(rgb);
        //a=255
        //r=255
        //g=255
        //b=255
        rgb = ColorConversionOps.convert32_16(rgb);
        ColorConversionOps.printRGB_16((short)rgb);
        //a=15
        //r=15
        //g=15
        //b=15
        rgb = ColorConversionOps.convert16_32((short)rgb);
        ColorConversionOps.printRGB_32(rgb);
        //a=240
        //r=240
        //g=240
        //b=240
    }And now we see, the reason 16bit color is so unpopular to the rest of the world, but not for us here!

  • [ALSB] turning on/off logging/tracing for proxy services

    Hi all,
    do you have any snippet for turning on/off logging/tracing for proxy services using WLST or JMX ?
    I've seen a previous thread about Enable/Disable Proxy Service using JMX and I'm looking for something similar.
    Regards
    ferp

    Thanks, but I mean using WLST or JMX code and not by ALSB console
    regards
    ferp

  • Need an Applescript for...

    I need an Applescript for turning off my computer after it has been idle for 2hrs. Please and Thank you

    See this post. http://macscripter.net/viewtopic.php?pid=68885

  • How do I turn shuffle off?

    Hi, I have the iPod Nano 6th generation and for the life of me I can't figure out how to turn the shuffle off. It is really annoying because I listen to a lot of audio spoken word albums and so really can't have it skipping around. Please help. I haven't even seen an option for turning it off. Thank you!

    iPod nano (6th generation) - User Guide

  • I use word for mac and keep getting an error message microsoft syn services has encountered a problem and needs to close.  tell microsoft about this problem. even if i clicked send info to m/soft the message still comes up repeatedly i've turned comp off

    i use word for mac & keep getting error message "microsoft sync services has encountered a problem & needs to close. tell m/soft about this prob" even if i tick send to m/soft and turn computer off & restart it just keeps reappearing repeatedly?

    i use word for mac & keep getting error message "microsoft sync services has encountered a problem & needs to close. tell m/soft about this prob" even if i tick send to m/soft and turn computer off & restart it just keeps reappearing repeatedly?

  • So the left side of my iPhone isn't working at all and I even tried turning it off for 5 minutes about 10 million times but nothing is working. Any suggestions on what to do I need help like ASAP!?

    So the left side of my iPhone isn't working at all and I even tried turning it off for 5 minutes about 10 million times but nothing is working. Any suggestions on what to do I need help like ASAP!?

    Have you performed a reset? Tap and hold the Home button and the On/Off button for approximately 10-15 seconds, until the Apple logo appears. Release both buttons and await restart.

  • If I sign up for 3g service on my iPAD, can I easily get Verizon to turn it off for a specified time...I might be in a Wifi area...or I might need to save some money on service I don't need for awhile.

    If i sign up for 3g service on m iPAD with Verizon, can I easily discontinue the 3g for awhile when I don't need it; then have Verizon turn it back on when I contact them?  Will they charge me for that on/off service?

    We don't work for Adobe. We are just users.
    You'll want to take this to the proper forum for that product at Adobe PDF Pack (read only)
    Good luck.

  • I need an application which turn off wifi automaticly when my Ipod Toch is locked (for save battery charge), i hate every time to turn it off manually please help ASAP!!!

    I need an application which turn off WiFi automaticly when my Ipod Toch is locked (for save battery charge)
    I hate every time to turn it off manually when I go sleep please help ASAP!!!
    If I forget to turn of wifi on my device after my 8hour dream it's battery will be discharged. and ofcourse alert do not ring. pls help urgent!!!
    Thanks

    Suggestion:
    Turn off your device before bed.

  • My iphone 4 keeps switching off if not used for an hour or so and needs the reboot to turn it on

    My IPhone 4 keeps switching off if not used for an hour or so and needs the reboot to turn it back on again?

    Hi, DREWidz.  
    Thank you for visiting Apple Support Communities.  
    It sounds like you are experiencing an issue with your device unexpectedly restarts.  Here are some troubleshooting steps that may help.  
    iOS: Device unexpectedly restarts, displays Apple logo, or powers off
    http://support.apple.com/en-us/TS5356
    Cheers, 
    Jason H.  

  • My ipod has a black screen with a loading symbol (its moving) i cant turn it off or plug it into itunes its been like this for about 3.5 hours. i need help!!!

    my ipod has a black screen with a loading symbol (its moving) i cant turn it off or plug it into itunes its been like this for about 3.5 hours. i tried to do a system reset it after a glitched download. but while it was reseting it got stuck ot a black loading screen.
                                                                                               PLEASE HELP ME !!!!!!!!

    The article helped me a bit but it doesnt help me totally because the buttons dont work and i cannot connect to itunes (itunes does not sense my ipod when plugged in) so im thinking to just let the battery uncharge...
                                                                 but when it went down i was fully charged
                                                                                  (im very unpatient)

  • I have a question. For the past week I have not been able to access my iTunes app it always kicks me out. I've turned it off and on and still nothing. I was wondering how can I get it to work or what should I do. Thank you

    I have a question. For the past week I have not been able to access my iTunes app it always kicks me out. I've turned it off and on and still nothing. I was wondering how can I get it to work or what should I do. Thank you

    You need a computer with iTunes and an internet connection
    Try:
    - Restore from backup. See:                                               
    iOS: Back up and restore your iOS device with iCloud or iTunes
    - Restore to factory settings/new iOS device.                       
    If still problem, make an appointment at the Genius Bar of an Apple store since it appears you have a hardware problem.
      Apple Retail Store - Genius Bar                                                              

  • My iphone wont turn on but when i plug it in to charge the apple logo comes on and turns back off after a few seconds i dont know what to do i need help

    my iphone wont turn on but when i plug it in to charge the apple logo comes on and turns back off after a few seconds i dont know what to do i need help

    Hello warhogs17,
    After reviewing your post, it sounds like the iPhone will not turn on past the Apple logo. I would recommend that you read this article, it may be able to help the issue.
    If your iPhone, iPad, or iPod touch doesn't respond or doesn't turn on - Apple Support
    Thanks for using Apple Support Communities.
    Have a nice day,
    Mario

  • The image came up on my screen saying that I need to connect my iPod to iTunes, but I have a passcode, so it won't allow me to. And I want to try and turn it off, but my touch screen doesn't seem to be working either. HELP!

    The image came up on my screen saying that I need to connect my iPod to iTunes, but I have a passcode, so it won't allow me to. And I want to try and turn it off, but my touch screen doesn't seem to be working either, so I can't even turn it off since you need to "slide to power off." HELP! I'm leaving on Thursday morning for six and a half weeks, and I absolutely need my iPod with me. I was just at the Apple store today for problems I was having with ANOTHER product, and I don't really want to drive all the way out to where my nearest store is (which is not very near) if I can figure this out at home. My iPod was working totally fine earlier today and last night, so I don't know what happened! Please, please, PLEASE HELP!

    Now it's allowing me to reboot (hold down power button and home button and restart), but every time it just comes up to the same thing: the connect to iTunes page. Which is not possible. And I refuse to restore my iPod. PLEASE HELP.

Maybe you are looking for

  • Reading special characters from a flat file and inserting into DB

    I'm reading data with special characters like . etc from a flat file , assigning the data to variable in my anonymous block and inserting into my DB. But the show up as inverted ? s. Any clues about how to do this? If i try to do the insert directly

  • Adobe Photoshop downloading problems is common?

    I downloaded Malware detection program but now i cannot get Adobe Photoshop and Air.

  • Why does Vertical Menu conceal items in design view?

    I have a problem with a vertical menu that is placed in my page's left column.  When workign in desing view, the vertical menu's sub menu components remain open and this conceals the things that I want to work on that are placed behind the sub-menu i

  • Opening Captivate 3 file

    Greetings everyone: I'm a new Captivate user (elearning developer) and I'm having a problem with others (my boss) being able to open my Captivate projects that I send to them for review. I've tried publishing as flash and standalone, and it seems Win

  • Should i export 8-bit uncompressed from a DV project?

    dual 2.5 g5, 7gb RAM, 500gb G-raid Working on an SD DV project in FCP 6.01. People keep saying in different forums that final product will look better by exporting in uncompressed 8 or 10 bit? Is this true? I tried exporting my three minute piece and