1 /* 2 * Copyright (C) 2012 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 package com.android.internal.util; 18 19 import android.compat.annotation.UnsupportedAppUsage; 20 import android.os.Build; 21 22 import java.io.Writer; 23 24 /** 25 * @deprecated Use {@link android.util.IndentingPrintWriter} 26 */ 27 @Deprecated 28 // Exported to Mainline modules; cannot use annotations 29 // @android.ravenwood.annotation.RavenwoodKeepWholeClass 30 public class IndentingPrintWriter extends android.util.IndentingPrintWriter { 31 32 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) IndentingPrintWriter(Writer writer, String singleIndent)33 public IndentingPrintWriter(Writer writer, String singleIndent) { 34 super(writer, singleIndent, -1); 35 } 36 IndentingPrintWriter(Writer writer, String singleIndent, int wrapLength)37 public IndentingPrintWriter(Writer writer, String singleIndent, int wrapLength) { 38 super(writer, singleIndent, wrapLength); 39 } 40 IndentingPrintWriter(Writer writer, String singleIndent, String prefix, int wrapLength)41 public IndentingPrintWriter(Writer writer, String singleIndent, String prefix, int wrapLength) { 42 super(writer, singleIndent, prefix, wrapLength); 43 } 44 setIndent(String indent)45 public IndentingPrintWriter setIndent(String indent) { 46 super.setIndent(indent); 47 return this; 48 } 49 setIndent(int indent)50 public IndentingPrintWriter setIndent(int indent) { 51 super.setIndent(indent); 52 return this; 53 } 54 55 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) increaseIndent()56 public IndentingPrintWriter increaseIndent() { 57 super.increaseIndent(); 58 return this; 59 } 60 61 @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) decreaseIndent()62 public IndentingPrintWriter decreaseIndent() { 63 super.decreaseIndent(); 64 return this; 65 } 66 printPair(String key, Object value)67 public IndentingPrintWriter printPair(String key, Object value) { 68 super.print(key, value); 69 return this; 70 } 71 printPair(String key, Object[] value)72 public IndentingPrintWriter printPair(String key, Object[] value) { 73 super.print(key, value); 74 return this; 75 } 76 printHexPair(String key, int value)77 public IndentingPrintWriter printHexPair(String key, int value) { 78 super.printHexInt(key, value); 79 return this; 80 } 81 } 82